:%s/search_string/replacement_string/g
Blog Archive
-
▼
2016
(147)
-
▼
September
(7)
- In vi, how can I perform a global search and replace?
- unix - Transpose a file in bash - Stack Overflow
- Perl one-liners - bl.ocks.org
- Bellevue Blocked Tear Ducts | Seattle | Kirkland |...
- run matlab function with arguments on linux termin...
- (5) How do I download and install MATLAB on Ubuntu...
- ibab (Igor Babuschkin)
-
▼
September
(7)
Tuesday, September 27, 2016
In vi, how can I perform a global search and replace?
In vi, how can I perform a global search and replace?: "In vi, how can I perform a global search and replace?"
'via Blog this'
Monday, September 26, 2016
unix - Transpose a file in bash - Stack Overflow
http://stackoverflow.com/questions/1729824/transpose-a-file-in-bash
python -c "import sys; print('\n'.join(' '.join(c) for c in zip(*(l.split() for l in sys.stdin.readlines() if l.strip()))))" < input > output
'via Blog this'
python -c "import sys; print('\n'.join(' '.join(c) for c in zip(*(l.split() for l in sys.stdin.readlines() if l.strip()))))" < input > output
A Python solution:
The above is based on the following:
This code does assume that every line has the same number of columns (no padding is performed). |
Perl one-liners - bl.ocks.org
Perl one-liners - bl.ocks.org: "Perl one-liners"
Insert line numbers in a file:
'via Blog this'
Insert line numbers in a file:
perl -i -ne 'printf "%04d %s", $., $_'
'via Blog this'
perl -i -ne 'printf "%04d %s", $., $_'
Friday, September 23, 2016
Bellevue Blocked Tear Ducts | Seattle | Kirkland | Redmond - Dr. Anh Truong Bellevue & Issaquah Ear, Nose & Throat (ENT)
Bellevue Blocked Tear Ducts | Seattle | Kirkland | Redmond - Dr. Anh Truong Bellevue & Issaquah Ear, Nose & Throat (ENT): "symptomatic and refractory"
'via Blog this'
'via Blog this'
run matlab function with arguments on linux terminal - MATLAB Answers - MATLAB Central
run matlab function with arguments on linux terminal - MATLAB Answers - MATLAB Central:
matlab -nodisplay -nojvm -r 'FunctionName Arg1 Arg2; exit;'
'via Blog this'
matlab -nodisplay -nojvm -r 'FunctionName Arg1 Arg2; exit;'
'via Blog this'
Wednesday, September 21, 2016
Thursday, September 15, 2016
Subscribe to:
Posts (Atom)