1 #!/bin/bash
2 # du.sh: DOS to UNIX text file converter.
3
4 E_WRONGARGS=65
5
6 if [ -z "$1" ]
7 then
8 echo "Usage: `basename $0` filename-to-convert"
9 exit $E_WRONGARGS
10 fi
11
12 NEWFILENAME=$1.unx
13
14 CR='\015' # Carriage return.
15 # Lines in a DOS text file end in a CR-LF.
16
17 tr -d $CR < $1 > $NEWFILENAME
18 # Delete CR and write to new file.
19
20 echo "Original DOS text file is \"$1\"."
21 echo "Converted UNIX text file is \"$NEWFILENAME\"."
22
23 exit 0
10/29/11
DOS to UNIX text file conversion script
Subscribe to:
Post Comments (Atom)
Quick HTTP to HTTPS - Apache2
There are several methods for redirecting your Apache-based website visitors who might type your servers URL using the plain (non-secure) HT...
-
This is to resolve auditd warning asking to specify an arch type for syscall events Sample auditd warning message: WARNING - 32/64 bit s...
-
Problem: RPM package removal error msg "Error: ... Specifies Multiple Packages" Solution: Run rpm -ev with the --allmatches opti...
-
I got a VBE6EXT.OLB could not be loaded error when I wanted to install this really great tool-set for Excel that I've been using for ye...
No comments:
Post a Comment