I have multiple files in Unix directory.
files names are as below.
EnvName.Fullbkp.schema_121212_1212_Part1.expd
EnvName.Fullbkp.schema_121212_1212_Part2.expd
It's some kind of extreme optimist who suggests sed -i
on AIX.
It's a bit more likely that perl will be installed.
perl -pi -e 's/10022012_0630/22052013_1000/' EnvName.Fullbkp.schema_121212_1212_Part*.expd
If no perl, then you'll just have to do it like a Real Man:
for i in EnvName.Fullbkp.schema_121212_1212_Part*.expd
do
ed -s "$i" <<'__EOF'
1,$s/10022012_0630/22052013_1000/g
wq
__EOF
done
Have some backups ready before trying these.
Assuming you mean you don't want to manually open the files:
sed -i 's/10022012_0630/22052013_1000/' filename*.log
update: since the "-i" switch is not available on AIX, but assuming you have ksh (or a compatible shell):
mkdir modified
for file in filename*.log; do
sed 's/10022012_0630/22052013_1000/' "$file" > modified/"$file"
done
Now the modified files will be in the modified
directory.