hello,
i'm really new to shell script, and need to do this in bash.
i'm looking fo a script which will acept something like "mypath/*.txt" in
argument, which will call another shell and redirect the output to a
modified name like mypath/*.modified.txt.
i've try we this but it still do not work
#!/bin/sh
call=a_script.sh
modified="modified."
dir=`dirname $1`
pattern=`basename $1`
files=`find $dir -name "$pattern"`
for file in $files
do
dir=`dirname $1`
ext=`basename $1|awk -F. 'NF>1{print $NF}'`
file=`basename $1 $ext`
a_script.sh < $file >$dir/$file$modified$ext
done
thanks for any help !