![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| removing the extension from all filenames in a folder | johnmcclintock | UNIX for Dummies Questions & Answers | 5 | 05-21-2008 05:23 AM |
| bash: reading filenames from file | warp17 | Shell Programming and Scripting | 0 | 03-04-2008 03:28 AM |
| reading long filenames from nero to AIX | categoryzd | UNIX for Dummies Questions & Answers | 1 | 05-18-2006 07:57 AM |
| Adding an extension to a group of filenames | pepintheshort | UNIX for Dummies Questions & Answers | 9 | 04-09-2004 05:11 PM |
| reading filenames inside a program | j_t_kim | UNIX for Dummies Questions & Answers | 5 | 04-04-2002 11:13 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Reading filenames with extension .xml
Hi,
I want to write a script to read all the filenames with extension .xml in a directory and pass the name of the file, one by one, to another function. Please help me out. Regards. Saurabh |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Code:
for file in /path/to/*.xml do grep stuff $file done |
|
#3
|
|||
|
|||
|
Quote:
1) it could all be on a single line - which means many unix utilities will not handle properly. 2) white space between tags is totally allowed, or optional (see #1) 3) It could be in "uni-code" which means there could be binary zeroes between every other character. so have fun with the variations. |
|
#4
|
|||
|
|||
|
Quote:
do function $file done |
|||
| Google The UNIX and Linux Forums |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|