Skip item by using substring
I have a file contents like this....
item1
item2
#item3
item4
#item5
item6
....
I have a KSH script to read this file into an array.
I have a for loop which will read each item...
I want to be able to skip those item start with # sign as first character in a if condiction inside the for loop.
How can I use substr, or parse or whatever way in ksh to detect the first character is a # sign.
Thanks in advance.
|