https://stackoverflow.com/questions/16212656/grep-exclude-multiple-strings
Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts
Friday, March 25, 2022
Sunday, March 6, 2022
sed command example
Below command will take a backup of the file and substitute v1alpha1 with v1beta1
sed -i .bak -e 's/v1alpha1/v1beta1/' ~/.kube/config
Thursday, June 17, 2021
Monday, January 25, 2021
Sunday, November 1, 2020
Wednesday, October 7, 2020
Saturday, September 12, 2020
Thursday, September 3, 2020
Saturday, August 1, 2020
Friday, July 10, 2020
Linux - Splitting & Joining a file
https://www.ibm.com/support/pages/how-use-split-and-cat-commands-split-large-file-smaller-pieces-and-then-restore-pieces-single-file
Splitting:
split -l 1000000 full_file.dat
Output is - xaa, xab, xac
Joining:
cat xab >> xaa
cat xac >> xaa
Note: At the lines where the files are joining, the ending line of part1 and 1st line of part 2 will be concatenated on the same line. We'll have to open the file in vi and just enter a newline in those places.
Splitting:
split -l 1000000 full_file.dat
Output is - xaa, xab, xac
Joining:
cat xab >> xaa
cat xac >> xaa
Note: At the lines where the files are joining, the ending line of part1 and 1st line of part 2 will be concatenated on the same line. We'll have to open the file in vi and just enter a newline in those places.
Tuesday, June 16, 2020
Tuesday, May 19, 2020
Sunday, May 17, 2020
Wednesday, May 6, 2020
Monday, March 16, 2020
Subscribe to:
Posts (Atom)