forked from andonome/lk
		
	formatting
This commit is contained in:
		| @@ -50,7 +50,7 @@ Compressing all Latex Files in /home/. | |||||||
|  |  | ||||||
| > sudo find ~ -maxdepth 4 -name "*.txt" | xargs tar cvf latex-bundle.tar.gz | > sudo find ~ -maxdepth 4 -name "*.txt" | xargs tar cvf latex-bundle.tar.gz | ||||||
|  |  | ||||||
| ## `zip | ## `zip` | ||||||
|  |  | ||||||
| Install `zip`. | Install `zip`. | ||||||
|  |  | ||||||
|   | |||||||
| @@ -22,7 +22,7 @@ Regular expression characters include: | |||||||
|  |  | ||||||
| As a result, grep cannot read these characters as literal characters unless they are escaped.  E.g. | As a result, grep cannot read these characters as literal characters unless they are escaped.  E.g. | ||||||
|  |  | ||||||
| > grep wtf\? log.txt | > grep wtf\\? log.txt | ||||||
|  |  | ||||||
| ... will search the string 'wtf?' in the file log.txt.  Another version is egrep (now used with 'grep -e') which uses more characters as special characters, or fgrep, which treats all characters as literal strings. | ... will search the string 'wtf?' in the file log.txt.  Another version is egrep (now used with 'grep -e') which uses more characters as special characters, or fgrep, which treats all characters as literal strings. | ||||||
|  |  | ||||||
| @@ -46,10 +46,20 @@ Export this to the entire system using: | |||||||
|  |  | ||||||
| > export colour=blue | > export colour=blue | ||||||
|  |  | ||||||
| # Search commands | # Search for Programs | ||||||
|  |  | ||||||
|  | Search for commands relevant to `cat`. | ||||||
|  |  | ||||||
| > apropos cat | > apropos cat | ||||||
|  |  | ||||||
|  | Show files used in the `cat` program. | ||||||
|  |  | ||||||
|  | > whereis cat | ||||||
|  |  | ||||||
|  | Show *which* file is the actual code which runs when you type `cat`: | ||||||
|  |  | ||||||
|  | > which cat | ||||||
|  |  | ||||||
| # Working with Text | # Working with Text | ||||||
|  |  | ||||||
| Convert every tab to ten spaces. | Convert every tab to ten spaces. | ||||||
| @@ -76,9 +86,13 @@ The sort function arranges lines alphabetically.  Use -r to reverse and -n to so | |||||||
|  |  | ||||||
| # Sed | # Sed | ||||||
|  |  | ||||||
| > sed -i s/hey/hoi/g greetings.txt | Change all examples of hey to hoi in greetings and show that output (does not change file). | ||||||
|  |  | ||||||
| Edit all examples of hey to hoi in greetings and print that to the file. | > sed 's/hey/hoi/g greetings.txt' | ||||||
|  |  | ||||||
|  | Change each example of 'cat' to 'dog' in the file 'animals.md'. | ||||||
|  |  | ||||||
|  | > sed 's/cat/dog/g' animals.md | ||||||
|  |  | ||||||
| # Measurement | # Measurement | ||||||
|  |  | ||||||
|   | |||||||
| @@ -28,7 +28,7 @@ Download and extract the root filesystem (as root, not via sudo): | |||||||
|  |  | ||||||
| Move boot files to the first partition: | Move boot files to the first partition: | ||||||
|  |  | ||||||
| > mv root/boot/* boot | > mv root/boot/\* boot | ||||||
| > Unmount the two partitions: | > Unmount the two partitions: | ||||||
| > umount boot root | > umount boot root | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user