thanks for the reply, but i couldnt get your code to work, it ran but nothng happend, did you use the korn shell?
i think that it should look something like this? maybe?
#!/bin/sh
num=$#
while [ "$num" -ge 1 ]
do
echo (($1 + 1)) '#this is the line that doesnt work
num=$((num -1))
done
exit 0
./censor this data please
this
data
please
this is how i want it to work, i would use the $1, $2 but you need to specify howmany inputs you are expecting
Last edited by trscookie; 11-02-2004 at 03:38 PM.
|