Can use tr to remove all carriage returns and Ctrl-z ( ^Z ) characters from a Windows file by entering:
tr -d '\15\32' < winfile.txt > unixfile.txt
tr '\r' '\n' < web_to_print_compare-edited.csv > unixfile.csv
Note: cannot use tr to convert a document from Unix format to Windows
Showing posts with label bash commands. Show all posts
Showing posts with label bash commands. Show all posts
Tuesday, March 16, 2010
TR (bash)
Thursday, March 11, 2010
sort and remove duplicates in file
sort and uniq will quickly and easily remove duplicates, lsit only the dupilcates or only the unique data.
sort myfile.txt | uniq
sort myfile.txt | uniq
Tuesday, August 4, 2009
VIM (continue)
New Commands
% - match brackets {} [] ()
l - move letter
w - move word
e - end of word
$ - end of line
'. - jump to last modification like (SUPER)
`. - jump to exact spot in last modification line
% - match brackets {} [] ()
l - move letter
w - move word
e - end of word
$ - end of line
'. - jump to last modification like (SUPER)
`. - jump to exact spot in last modification line
Wednesday, April 22, 2009
BASH (PATH setup)
PATH=$PATH:/data/myscripts
export PATH
1. One User ($HOME/.bash_profile)
2. All users except root /etc/profile
3. root /root/.bash_profile
FOR JAVA:
$JAVA_HOME=/usr/java/jdk1.6.0_13 (java location)
$PATH=/usr/java/jdk1.6.0_13/bin (for javac and java)
export PATH
1. One User ($HOME/.bash_profile)
2. All users except root /etc/profile
3. root /root/.bash_profile
FOR JAVA:
$JAVA_HOME=/usr/java/jdk1.6.0_13 (java location)
$PATH=/usr/java/jdk1.6.0_13/bin (for javac and java)
Thursday, March 26, 2009
bash commands
C-a# Move to the beginning of line
C-e # Move to the end of line
C-l # Clear screen
C-k # Kill the text from the point to the end
Subscribe to:
Posts (Atom)