What's wrong with this line?
Can anybody tell me what's wrong with this line?:
alias dlbkup="ls -l ~/ | grep {a-zA-Z]"~"$ | awk '{print "rm "$NF}' | tcsh" The command : ls -l ~/ | grep {a-zA-Z]"~"$ | awk '{print "rm "$NF}' | tcsh for itself works. Why can't I alias it? |
try
alias dlbkup=`ls -l ~/ | grep {a-zA-Z]"~"$ | awk '{print "rm "$NF}' | tcsh` it is not ', but ` |
this is the improved line:
alias dlbkup=' ls -l ~/ | grep .~$ | awk '{print "rm "$NF}' | tcsh' now it saves the alias without a worning but the command doesn't work afterwards. any idea? |
are you shure it's working?
' ls -l ~/ | grep .~$ | awk '{print "rm "$NF}' | tcsh' ^ ^ ^ ^ |__________________| |____| I don't think it is going to work. And I sow my line is not working :). Sorry But this I think will work: alias dlbkup="ls -l ~/ | grep {a-zA-Z]\"~\"$ | awk '{print \"rm \"$NF}' | tcsh" --first example |
That single quote should be the one from the upper left of a US keyboard, on the key with the tilde.
|
All times are GMT -5. The time now is 09:40 PM. |