The UNIX and Linux Forums  

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-29-2008
grial's Avatar
grial grial is offline Forum Advisor  
El UNIX es como un toro
  
 

Join Date: Jun 2006
Location: Madrid (Spain)
Posts: 531
Yes, I've tryed it and works. Tough, in the example, the script only takes the file name and echoes it. From that, doing the rest is easy.... For instance:

Code:
#!/bin/ksh

set -A ARGS $@

FILE=${ARGS[$(expr $# - 1)]}

echo $@ | sed s/$FILE// >> $FILE