Hi,
I am counting no. of lines in a file using cat like this on a unix system.
$line_count = `cat $filename | wc -l`
This works fine. But one of the files having a blank in int's path like this.
Module: /org/trans/program files/src/apptask1.c.
Then the above my code to count lines fails. Also some times when the path is big it breaks in to two lines and I unable to pickup the file name properly. I am reading file names from a file. So how to find the file name if in two lines in a file? For ex:
Module: /org/trans/program files/dir1/dir2/dir3/dir4/
dir5/apptask2.c
I able to read first line /org/trans/program files/dir1/dir2/dir3/dir4/ only. I do not know when the file name breaks into two lines. Each file name is preceded by "Module: ". So my regular expression is to match a line beginning with 'Module: ' and pickup the remaining text as a file name. So can any one help me?
Thanks
Ashok