Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 10-22-2003, 03:22 AM   #1
LQ Newbie
Registered: Oct 2003
Posts: 12

Rep: Reputation: 0
Question 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?
Old 10-22-2003, 03:34 AM   #2
Registered: Jun 2003
Posts: 71

Rep: Reputation: 15
alias dlbkup=`ls -l ~/ | grep {a-zA-Z]"~"$ | awk '{print "rm "$NF}' | tcsh`
it is not ', but `
Old 10-22-2003, 04:28 AM   #3
LQ Newbie
Registered: Oct 2003
Posts: 12

Original Poster
Rep: Reputation: 0
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?
Old 10-22-2003, 06:15 AM   #4
Registered: Jun 2003
Posts: 71

Rep: Reputation: 15
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
Old 10-23-2003, 01:04 PM   #5
Registered: Apr 2003
Location: Juneau, Alaska
Posts: 251

Rep: Reputation: 32
That single quote should be the one from the upper left of a US keyboard, on the key with the tilde.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mondrian OLAP+JAVA: whats wrong with my command line? zakidad Programming 4 06-14-2005 03:40 AM
Whats wrong with this line of fstab Boffy Linux - General 4 02-25-2005 04:32 PM
wrong refresh rate in command line mode? Meta42 Mandriva 2 03-19-2004 07:13 AM
fstab error in line 11, what's wrong? EPa Linux - Networking 4 03-06-2004 10:46 AM
PHP: what's wrong with this line (shell_exec, find, xargs, grep)? J_Szucs Programming 3 11-19-2003 07:44 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:33 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration