Jump to content

Bash Scripting question


Recommended Posts

Hello,

 

I am trying to make a little feature that will save me a lot of time in the future. As many know the commands in Linux are extensive and I often forget many commands that I learned in the past - only to have to learn them again. I figured a simple tool to avoid this is to make a little .note file under my /home/user/ and make an alias that would dump what I type to it.

 

In other words:

 

At the prompt I want to type the following:

 

note Whereis - command for locating files

 

This would open my editor, input the string and close the file.

 

I can do it now, but all the alias note does is is open emacs /home/user/.note , the rest I have to input and then manually save. I am not a bash expert and I figured this would be easy enough for someone who was.

 

Appreciated.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...