LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 10-22-2003, 04:22 AM   #1
police8677
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, 04:34 AM   #2
cristi1979
Member
 
Registered: Jun 2003
Posts: 71

Rep: Reputation: 15
try
alias dlbkup=`ls -l ~/ | grep {a-zA-Z]"~"$ | awk '{print "rm "$NF}' | tcsh`
it is not ', but `
 
Old 10-22-2003, 05:28 AM   #3
police8677
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, 07:15 AM   #4
cristi1979
Member
 
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, 02:04 PM   #5
camelrider
Member
 
Registered: Apr 2003
Location: Juneau, Alaska
Posts: 247

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


Reply


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 04:40 AM
Whats wrong with this line of fstab Boffy Linux - General 4 02-25-2005 05:32 PM
wrong refresh rate in command line mode? Meta42 Mandriva 2 03-19-2004 08:13 AM
fstab error in line 11, what's wrong? EPa Linux - Networking 4 03-06-2004 11:46 AM
PHP: what's wrong with this line (shell_exec, find, xargs, grep)? J_Szucs Programming 3 11-19-2003 08:44 PM


All times are GMT -5. The time now is 10:26 PM.

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