The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
written a srcipt with 2 arguments
.
User Name
Remember Me?
Password
google unix.com
Forums
Register
Forum Rules
Links
Albums
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Thread
:
written a srcipt with 2 arguments
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
4
(
permalink
)
04-29-2008
grial
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
grial
View Public Profile
Find all posts by grial
Find grial's past nominations received
Find grial's present nominations given