linux - Run an Executable on all Files in a Directory and Get Different Output Files Corresponding to the Original Files -
i have redhat linux terminal programme utilizes next command: programme inputfile outputfile
inputfile name of file want modified , outputfile name of output file.
i need c shell command can run programme on files in same directory (001p.pdb way 361p.pdb) , create output files names 001h.pdb, 002h.pdb ... 361h.pdb
using sh sub-shell in next instead of csh faster, code below work in shell:
find . -maxdepth 1 -regex '\./[0-9][0-9][0-9]p\.pdb' | xargs -i _in_ csh -c 'program _in_ `echo _in_ | sed -e s/p/h/`' assumption files in current working directory -- command can extended take care of arbitrary directories.
linux shell terminal executable csh
No comments:
Post a Comment