Hi,
In a loop stage I use the list loop option for which I get values by issuing a ls -m command which retrieves a list of files with a comma and SPACE between each file. It also has a New Line character added to it at the end of the fourth file in the list.
File1, File2, File3, File4,
File5, File6, File7, File8
Now how do i specify two different delimiters at the same time for those files which fall at the end??
This has taken a lot of time out of me.
Could I get your valuable inputs pls.
Thanks.
Expressing delimiter's in a loop stage??
Moderators: chulett, rschirm, roy
Expressing delimiter's in a loop stage??
Regards,
Madhu Dharmapuri
Madhu Dharmapuri
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Note that the argument to ls here is the numeric "1", not the lower case "L". The "1" option forces output to be one file per line, that is, in a single column. It's the easiest way to get a list of file names to process. You can follow it with any regular expression for filtering the list of file names.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Chulett & Ray,
Yes!
I did try ls -1 and got an output like
File1
File2
File3
File4
.......that was fine but the delimiter '\n' is not being recognised. Is the representation of this carriage return right or is there any other way.
If this works out then that would be excellent.
Thanks.
Yes!
I did try ls -1 and got an output like
File1
File2
File3
File4
.......that was fine but the delimiter '\n' is not being recognised. Is the representation of this carriage return right or is there any other way.
If this works out then that would be excellent.
Thanks.
Regards,
Madhu Dharmapuri
Madhu Dharmapuri
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: