
July 10th, 2007, 04:12 PM
|
|
Registered User
|
|
Join Date: Jun 2007
Posts: 3
Time spent in forums: 1 h 8 m 37 sec
Reputation Power: 0
|
|
|
Read First Character of Each Line in File
I need a better way to read the first character of each line in a file and check if it equals the special character ¤. This character tells me where there is a break in the reports. The file has over 500,000 lines. Currently, this is my code -
if [[ $(echo $line|cut -c1-1) = "¤" ]]
I am using Korn Shell as a scripting language. Is there a better way to do this?
Thank you for your assistance.
|