HI,
I have a large number of files in a directory. I need to read the names of each file and then print a listing.
For example
/files/AKanchorage
/files/TXDallas.
I want to read each file and then print data like this:
anchorage:Line 1
anchorage:Line 2
Dallas:Line 1
Dallas:Line 2
There are two problems,
1: I forget how to get all about the first 2 characters of a variable. ie. convert AKanchorage to anchorage
2: I'm not sure how to check for a blank line. I don't want to print a line like anchorage:
Any help greatly appreciated. Thanks.
Jer
I have a large number of files in a directory. I need to read the names of each file and then print a listing.
For example
/files/AKanchorage
/files/TXDallas.
I want to read each file and then print data like this:
anchorage:Line 1
anchorage:Line 2
Dallas:Line 1
Dallas:Line 2
There are two problems,
1: I forget how to get all about the first 2 characters of a variable. ie. convert AKanchorage to anchorage
2: I'm not sure how to check for a blank line. I don't want to print a line like anchorage:
Any help greatly appreciated. Thanks.
Jer