1753946 Members
8243 Online
108811 Solutions
New Discussion юеВ

c-shell script problem

 
Ian McClement
Occasional Contributor

c-shell script problem

Can anyone suggest the best way to strip off line numbering inserted into a c-shell script, but still retaining the formatting / blank lines etc.

Thanks

Ian
3 REPLIES 3
Dan Hetzel
Honored Contributor

Re: c-shell script problem

Hi Ian,

Without having more information about the formatting of your script, it's difficult to be accurate.

Either 'awk' or 'cut' could do what you want.
If you want a more accurate reply, please pase a few lines of your script here.

Best regards,

Dan
Everybody knows at least one thing worth sharing -- mailto:dan.hetzel@wildcroft.com
Dragan Krnic
Frequent Advisor

Re: c-shell script problem

Are you sure about line numbering?

If you are editing with vi then you can toggle to no-numbering with ":set nonu". Your "~/.exrc" may have the equivalent of ":set nu" so you only see the numbering while editing. The file itself contains no numbering.
Tom Danzig
Honored Contributor

Re: c-shell script problem

If there are in fact line numbers preceding each line, you could do:

awk '{$1="";print $0}' scipt_file_name > newscript_file_name