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. )
Since with many commands one may loses overview (e.g. I have several personal modified short aliases for
I'd like to have a cheat (german: spick) - sheet (zettel) for them, not looking into the .cshrc everytime.
shell-command
in my ~/.cshrc
And the miniscript
..because it's annoying to update the cheat-sheet everytime you made a change, I wanna just type
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.
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
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
mspick
to do it automatically 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.