Linux Shell Script For Each File in a Directory Grab the filename and execute a program?

Bash: for f in *. Xls ; do xls2csv "$f" "${f%. Xls}.

Csv" ; done.

1 +1 for simplicity – Tom Feb 19 '10 at 16:12 Simply awesome! Works perfectly! Thank you so much!

– ThinkCode Feb 19 '10 at 16:34.

Look at the find command. What you are looking for is something like find . -name "*.

Xls" -type f -exec program Post edit find . -name "*. Xls" -type f -exec xls2csv '{}' '{}'.

Csv; will execute xls2csv file. Xls file.xls. Csv Closer to what you want.

Find -maxdepth 1 to exclude subfolders. This also converts test. Xls to test.xls.

Csv instead of test.csv. So not quite what OP asked for, but pretty close. – ephemient Feb 19 '10 at 16:22.

Find . -type f -name "*. Xls" -printf "xls2csv %p %p.

Csv\n" | bash bash 4 (recursive) shopt -s globstar for xls in /path/**/*. Xls do xls2csv "$xls" "${xls%. Xls}.

Csv" done.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions