Re: How to ensure one blank line on top of ASCII files?

2006-02-25 Thread Kristian Vaaf
At 01:51 14.02.2006, Randy Pratt wrote: Hi, I'm replying offlist since this isn't particularly a FreeBSD question. Something like this may work for you: addline.sh: == #!/bin/sh #Check if file begins with blank line, if not, insert a blank line firstline="`

Re: How to ensure one blank line on top of ASCII files?

2006-02-13 Thread Kristian Vaaf
At 12:42 13.02.2006, Norberto Meijome wrote: Kristian Vaaf wrote: > > Hello! > > I need to make sure all my ASCII files start with one blank line. > > I just need to know what command to use, > I've written the rest of the script to do this for me: > > -- > echo "" > MY_BLANK_LINE.txt > for fil

Re: How to ensure one blank line on top of ASCII files?

2006-02-13 Thread Norberto Meijome
Kristian Vaaf wrote: > > Hello! > > I need to make sure all my ASCII files start with one blank line. > > I just need to know what command to use, > I've written the rest of the script to do this for me: > > -- > echo "" > MY_BLANK_LINE.txt > for file in `find -s . -type f -not -name ".*"`;

How to ensure one blank line on top of ASCII files?

2006-02-13 Thread Kristian Vaaf
Hello! I need to make sure all my ASCII files start with one blank line. I just need to know what command to use, I've written the rest of the script to do this for me: -- for file in `find -s . -type f -not -name ".*"`; do if file -b "$file" | grep -q 'text'; then W