The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 04-14-2008
aigles's Avatar
aigles aigles is offline Forum Advisor  
Registered User
  
 

Join Date: Apr 2004
Location: Bordeaux, France
Posts: 1,420
For the sed command you can also do :
Code:
sed 's/.$//'
You can combine grep|tail|awk|sed pipeline into one awk command :
Code:
df -h| awk '/search string/ {res=$2} END { sub(/.$/,"", res); print res }'
Jean-Pierre.