Solved personal shell alias cheat sheet

  • Thread starter Deleted member 43773
  • Start date
D

Deleted member 43773

Guest
Individual shell commands (aliases/scripts) are extremely useful to enlarge the efficiency of personal shell work - no question about it (no need to mention here that the shell is one if not the most powerful tool within unix-like systems, but I needed an opening phrase. :p)

Since with many commands one may loses overview (e.g. I have several personal modified short aliases for ls [who not?])
I'd like to have a cheat (german: spick) - sheet (zettel) for them, not looking into the .cshrc everytime.

shell-command spick is nothing but
Code:
alias spick     cat ~/spickzettel
alias mspick    ~/path/to/script/make_spickzettel.sh
in my ~/.cshrc

And the miniscript make_spickzettel.sh contains just
Code:
 #!/bin/sh
 # all lines containing 'alias' into temporary file sp
 grep 'alias' ~/.cshrc > ~/sp
 # delete the aliases - cut rows 2 to 5 into file spickzettel
 cut -d ' ' -f 2,3,4,5 ~/sp > ~/spickzettel
 rm ~/sp
 exit 0
..because it's annoying to update the cheat-sheet everytime you made a change, I wanna just type mspick to do it automatically :cool:

It's just a very small idea - nothing new/great to geeks, and I didn't know where else to place it (Ah! Thanks!! 🥰), but it may be useful for somebody.
 
I'd like to have a cheat (german: spick) - sheet (zettel) for them, not looking into the .cshrc everytime.
If you enter the command alias (without any arguments) you get an overview of all the set aliases.
 
...🤣 ... okay. From behind, through the knee into the eye - that's me

...but my version still have advantages:
You'll receive possible comments and I find it better formatted readable

alias :


la (ls -lFao)
lg (ls -lFSh)
ll (ls -lh)
lt (ls -lFth)



spick :


la ls -lFao # All
ll ls -lh # Long
lg ls -lFSh # Groesse
lt ls -lFth # Time
 
Back
Top