oneliner bash question

gabriel danstemporaryaccount-FFYn/CNdgSA= at public.gmane.org
Mon Apr 19 14:16:56 UTC 2004


i'm writing a script, that amon other things, gets the size of a file it's 
downloading and at the moment, i've got this working:

  ssh $host "du -sh "$path/$file | awk '{print $1}'"

but the problem is that tihs prints out "12M\n" and i'd like to remove the 
"\n".  i tried this:

  ssh $host "du -sh "$path/$file | awk '{print $1}' | sed -e 's/\n//g'"

but obviously my understanding of sed has a gap in it, 'cause this didn't 
work.  suggestions/help would be very much appreciated.

thanks.

-- 
thanks be to god that gave me stubborness when i know i am right.
	- john adams

--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list