[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] checking file line: 'commit;'
From: |
David Niklas |
Subject: |
Re: [Help-bash] checking file line: 'commit;' |
Date: |
Tue, 23 Aug 2016 10:43:06 -0400 |
> You're right... The file were originally written in Windows and there's
> Windows garbage (carriage return) follows 'commit;' string :-( Changing
> the check to 'commit;'$'\r' fixes the problem...
> I wish I could sanitize the file or work on sanitized version, but the
> project manager isn't willing to take the risk :-(
Converting the line ending could be tested on one or two files before
doing the whole batch. It's only a fatal mistake to make on a windows
machine.
I've written a custom awk one liner script with great success, you would
not believe how many times it has come in handy on a rescue/air gaped
system or when the package manager is not working.
There are also several programs that can do this:
hd2u http://www.megaloman.com/~hany/software/hd2u
dos2unix (my fav) http://sourceforge.net/projects/dos2unix.html
recode http://recode.progiciels-bpi.ca/
Sincerely,
David
- Re: [Help-bash] checking file line: 'commit;',
David Niklas <=