Dear all,
I have several ABC.ps files that I would like to transform into pdf for visualization reasons. Each of them is in a different directory and all of them are called exactly ABC.ps:
/../alpha/ABC.ps
/../beta/ABC.ps
/../gamma/ABC.ps
..
I want them to have the directory name as filename, so that it will be easy for me to pick up the ones I need to see with acroread, once ps2pdfed them.
Would you use mv for example? But how can I tell it to get the dirname?
I've tried several options, including baseline ´pwd` but with no wayout.
I would start with:
Code:
for i in ${ls */ABC.ps}
do
CHANGE NAME $i
ps2pdf $i
done
or the other way round
Code:
for i in ${ls */ABC.ps}
do
ps2pdf $i
CHANGE NAME $i
done
I would strongly appreciate any help.
Sincerely,
Udiubu