mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-29 23:24:55 +02:00
Normalize the final new line
Fixes #310 Some files had no newlines, some had 1 newline and some more than 1 newline. Normalize them all to have only 1 newline at the end of all files.
This commit is contained in:
parent
acf8756f56
commit
e4114fa6cc
45 changed files with 25 additions and 50 deletions
|
@ -8,4 +8,4 @@
|
||||||
|
|
||||||
- Execute 100 HTTP GET requests, processing up to 10 requests concurrently, to given URL.
|
- Execute 100 HTTP GET requests, processing up to 10 requests concurrently, to given URL.
|
||||||
|
|
||||||
`ab -n 100 -c 10 {{url}}`
|
`ab -n 100 -c 10 {{url}}`
|
||||||
|
|
|
@ -16,4 +16,4 @@
|
||||||
|
|
||||||
- Show the file names containing "foo" and number of matches in each file
|
- Show the file names containing "foo" and number of matches in each file
|
||||||
|
|
||||||
`ack -cl {{foo}}`
|
`ack -cl {{foo}}`
|
||||||
|
|
|
@ -17,5 +17,3 @@
|
||||||
- Sum the values in the first column and pretty-print the values and then the total
|
- Sum the values in the first column and pretty-print the values and then the total
|
||||||
|
|
||||||
`awk '{s+=$1; print $1} END {print "--------"; print s}' {{filename}}`
|
`awk '{s+=$1; print $1} END {print "--------"; print s}' {{filename}}`
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -16,4 +16,4 @@
|
||||||
- Display date of Easter (western churches)
|
- Display date of Easter (western churches)
|
||||||
|
|
||||||
`ncal -e`
|
`ncal -e`
|
||||||
`ncal -e 2013`
|
`ncal -e 2013`
|
||||||
|
|
|
@ -8,4 +8,4 @@
|
||||||
|
|
||||||
- Sequentially print the contents of *file1* and *file2* to the file *file3*.
|
- Sequentially print the contents of *file1* and *file2* to the file *file3*.
|
||||||
|
|
||||||
`cat {{file1}} {{file2}} > {{file3}}`
|
`cat {{file1}} {{file2}} > {{file3}}`
|
||||||
|
|
|
@ -9,4 +9,3 @@
|
||||||
- Display the date using a custom format
|
- Display the date using a custom format
|
||||||
|
|
||||||
`date +"%d/%m/%Y %H:%M:%S"`
|
`date +"%d/%m/%Y %H:%M:%S"`
|
||||||
|
|
||||||
|
|
|
@ -12,4 +12,4 @@
|
||||||
|
|
||||||
- Remove a user from a group
|
- Remove a user from a group
|
||||||
|
|
||||||
`deluser {{name}} {{group}}`
|
`deluser {{name}} {{group}}`
|
||||||
|
|
|
@ -9,4 +9,3 @@
|
||||||
- display all file systems and their disk usage in human readable form
|
- display all file systems and their disk usage in human readable form
|
||||||
|
|
||||||
`df -h`
|
`df -h`
|
||||||
|
|
||||||
|
|
|
@ -25,4 +25,3 @@
|
||||||
- Clear CSS and JavaScript caches
|
- Clear CSS and JavaScript caches
|
||||||
|
|
||||||
`drush cc css-js`
|
`drush cc css-js`
|
||||||
|
|
||||||
|
|
|
@ -16,4 +16,4 @@
|
||||||
|
|
||||||
- Set a variable and run a program
|
- Set a variable and run a program
|
||||||
|
|
||||||
`env {{variable}}={{value}} {{program}}`
|
`env {{variable}}={{value}} {{program}}`
|
||||||
|
|
|
@ -13,5 +13,3 @@
|
||||||
- Include libraries from a different path
|
- Include libraries from a different path
|
||||||
|
|
||||||
`gcc {{source.c}} -o {{executable}} -I{{header_path}} -L{{library_path}} -l{{library_name}}`
|
`gcc {{source.c}} -o {{executable}} -I{{header_path}} -L{{library_path}} -l{{library_name}}`
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -13,4 +13,3 @@
|
||||||
- Also add ignored files
|
- Also add ignored files
|
||||||
|
|
||||||
`git add -f`
|
`git add -f`
|
||||||
|
|
||||||
|
|
|
@ -9,4 +9,4 @@
|
||||||
|
|
||||||
- list signal names
|
- list signal names
|
||||||
|
|
||||||
`kill -l`
|
`kill -l`
|
||||||
|
|
|
@ -18,4 +18,4 @@
|
||||||
|
|
||||||
- exit
|
- exit
|
||||||
|
|
||||||
`q`
|
`q`
|
||||||
|
|
|
@ -13,4 +13,3 @@
|
||||||
- Combine audio from one file and video from another
|
- Combine audio from one file and video from another
|
||||||
|
|
||||||
`MP4Box -add {{input1.mp4}}#audio -add {{input2.mp4}}#video {{output.mp4}`
|
`MP4Box -add {{input1.mp4}}#audio -add {{input2.mp4}}#video {{output.mp4}`
|
||||||
|
|
||||||
|
|
|
@ -4,4 +4,4 @@
|
||||||
|
|
||||||
- Run process that can live beyond the terminal
|
- Run process that can live beyond the terminal
|
||||||
|
|
||||||
`nohup {{command options}}`
|
`nohup {{command options}}`
|
||||||
|
|
|
@ -16,4 +16,4 @@
|
||||||
|
|
||||||
- Run PHP code. Notes: a) Don't use <? ?> tags; b) Escape double quotes with backslash
|
- Run PHP code. Notes: a) Don't use <? ?> tags; b) Escape double quotes with backslash
|
||||||
|
|
||||||
`php -r "{{code}}"`
|
`php -r "{{code}}"`
|
||||||
|
|
|
@ -20,4 +20,4 @@
|
||||||
|
|
||||||
- Install packages from file
|
- Install packages from file
|
||||||
|
|
||||||
`pip install -r {{requirements.txt}}`
|
`pip install -r {{requirements.txt}}`
|
||||||
|
|
|
@ -19,5 +19,3 @@
|
||||||
- Play the given audio in reverse
|
- Play the given audio in reverse
|
||||||
|
|
||||||
`play {{audiofile}} reverse`
|
`play {{audiofile}} reverse`
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -16,4 +16,4 @@
|
||||||
|
|
||||||
- Run several queries against the given *database*. Note: useful in shell scripts
|
- Run several queries against the given *database*. Note: useful in shell scripts
|
||||||
|
|
||||||
`echo '{{query1}}; {{query2}}' | psql {{database}}`
|
`echo '{{query1}}; {{query2}}' | psql {{database}}`
|
||||||
|
|
|
@ -17,4 +17,4 @@
|
||||||
|
|
||||||
- Executes Redis command
|
- Executes Redis command
|
||||||
|
|
||||||
`redis-cli {{redis command}}`
|
`redis-cli {{redis command}}`
|
||||||
|
|
|
@ -12,4 +12,4 @@
|
||||||
|
|
||||||
- Prompt before every removal
|
- Prompt before every removal
|
||||||
|
|
||||||
`rm -i {{\*}}`
|
`rm -i {{\*}}`
|
||||||
|
|
|
@ -21,4 +21,3 @@
|
||||||
- Detach from inside a screen
|
- Detach from inside a screen
|
||||||
|
|
||||||
`ctrl+A D`
|
`ctrl+A D`
|
||||||
|
|
||||||
|
|
|
@ -18,5 +18,3 @@
|
||||||
- replace all occurrences of multiple strings in a file
|
- replace all occurrences of multiple strings in a file
|
||||||
|
|
||||||
`sed -e 's/{{find}}/{{replace}}/g' -e 's/{{find}}/{{replace}}/g' {{filename}}`
|
`sed -e 's/{{find}}/{{replace}}/g' -e 's/{{find}}/{{replace}}/g' {{filename}}`
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -13,4 +13,3 @@
|
||||||
- Split a file with at most 512 bytes of lines in each split.
|
- Split a file with at most 512 bytes of lines in each split.
|
||||||
|
|
||||||
`split -C 512 {{filename}}`
|
`split -C 512 {{filename}}`
|
||||||
|
|
||||||
|
|
|
@ -15,4 +15,4 @@
|
||||||
|
|
||||||
- Prompt before every removal
|
- Prompt before every removal
|
||||||
|
|
||||||
`srm -i {{\*}}`
|
`srm -i {{\*}}`
|
||||||
|
|
|
@ -25,4 +25,3 @@
|
||||||
- capture all traffic except traffic over port 22 and save to a dump file
|
- capture all traffic except traffic over port 22 and save to a dump file
|
||||||
|
|
||||||
`tcpdump -w dumpfile.pcap not port 22`
|
`tcpdump -w dumpfile.pcap not port 22`
|
||||||
|
|
||||||
|
|
|
@ -17,4 +17,3 @@
|
||||||
- Create new user with supplementary groups (mind the lack of whitespace)
|
- Create new user with supplementary groups (mind the lack of whitespace)
|
||||||
|
|
||||||
`useradd -G {{group1,group2}} {{name}}`
|
`useradd -G {{group1,group2}} {{name}}`
|
||||||
|
|
||||||
|
|
|
@ -4,4 +4,4 @@
|
||||||
|
|
||||||
- Remove a user and their home directory
|
- Remove a user and their home directory
|
||||||
|
|
||||||
`userdel -r {{name}}`
|
`userdel -r {{name}}`
|
||||||
|
|
|
@ -12,4 +12,4 @@
|
||||||
|
|
||||||
- Create a new home directory for a user and move their files to it
|
- Create a new home directory for a user and move their files to it
|
||||||
|
|
||||||
`usermod -m -d {{/path/to/home}} {{user}}`
|
`usermod -m -d {{/path/to/home}} {{user}}`
|
||||||
|
|
|
@ -13,4 +13,3 @@
|
||||||
- count characters in file (taking multi-byte character sets into account)
|
- count characters in file (taking multi-byte character sets into account)
|
||||||
|
|
||||||
`wc -m {{file}}`
|
`wc -m {{file}}`
|
||||||
|
|
||||||
|
|
|
@ -24,4 +24,4 @@
|
||||||
|
|
||||||
- Change mountpoint for a filesytem
|
- Change mountpoint for a filesytem
|
||||||
|
|
||||||
`zfs set mountpoint={{/my/mount/path}} {{poolname/filesystem}}`
|
`zfs set mountpoint={{/my/mount/path}} {{poolname/filesystem}}`
|
||||||
|
|
|
@ -8,4 +8,4 @@
|
||||||
|
|
||||||
- Recompute the database. You need to do it if you want to find recently added files.
|
- Recompute the database. You need to do it if you want to find recently added files.
|
||||||
|
|
||||||
`sudo updatedb`
|
`sudo updatedb`
|
||||||
|
|
|
@ -14,4 +14,3 @@
|
||||||
- send a message with timeout (default 300)
|
- send a message with timeout (default 300)
|
||||||
|
|
||||||
`wall -t {{seconds}} {{file}}`
|
`wall -t {{seconds}} {{file}}`
|
||||||
|
|
||||||
|
|
|
@ -9,5 +9,3 @@
|
||||||
- Prevent mac from sleeping until a command completes
|
- Prevent mac from sleeping until a command completes
|
||||||
|
|
||||||
`caffeinate -s {{command}}`
|
`caffeinate -s {{command}}`
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -9,4 +9,3 @@
|
||||||
- Burn a folder as an ISO9660 filesystem onto a DVD. Don't verify and eject when complete.
|
- Burn a folder as an ISO9660 filesystem onto a DVD. Don't verify and eject when complete.
|
||||||
|
|
||||||
`drutil burn -noverify -eject -iso9660`
|
`drutil burn -noverify -eject -iso9660`
|
||||||
|
|
||||||
|
|
|
@ -9,4 +9,4 @@
|
||||||
|
|
||||||
- Recompute the database. You need to do it if you want to find recently added files.
|
- Recompute the database. You need to do it if you want to find recently added files.
|
||||||
|
|
||||||
`sudo /usr/libexec/locate.updatedb`
|
`sudo /usr/libexec/locate.updatedb`
|
||||||
|
|
|
@ -20,4 +20,4 @@
|
||||||
|
|
||||||
- Open all the word docs in the current directory with Microsoft Word
|
- Open all the word docs in the current directory with Microsoft Word
|
||||||
|
|
||||||
`open *.doc`
|
`open *.doc`
|
||||||
|
|
|
@ -9,4 +9,3 @@
|
||||||
- Place the results of a command in the clipboard
|
- Place the results of a command in the clipboard
|
||||||
|
|
||||||
`find . -type t -name "*.png" | pbcopy`
|
`find . -type t -name "*.png" | pbcopy`
|
||||||
|
|
||||||
|
|
|
@ -9,4 +9,3 @@
|
||||||
- Use the contents of the clipboard as input to a command.
|
- Use the contents of the clipboard as input to a command.
|
||||||
|
|
||||||
`pbpaste | grep foo`
|
`pbpaste | grep foo`
|
||||||
|
|
||||||
|
|
|
@ -9,4 +9,3 @@
|
||||||
- Print OSX Build
|
- Print OSX Build
|
||||||
|
|
||||||
`sw_vers -buildVersion`
|
`sw_vers -buildVersion`
|
||||||
|
|
||||||
|
|
|
@ -8,4 +8,4 @@
|
||||||
|
|
||||||
- Pass a value to a parameter in the stylesheet
|
- Pass a value to a parameter in the stylesheet
|
||||||
|
|
||||||
`xsltproc --output {{output.html}} --stringparam {{name}} {{value}} {{stylesheet.xslt}} {{xmlfile.xml}}`
|
`xsltproc --output {{output.html}} --stringparam {{name}} {{value}} {{stylesheet.xslt}} {{xmlfile.xml}}`
|
||||||
|
|
|
@ -13,4 +13,4 @@
|
||||||
|
|
||||||
- Get specific limit for a running process
|
- Get specific limit for a running process
|
||||||
|
|
||||||
`prctl -n process.max-file-descriptor {{PID}}`
|
`prctl -n process.max-file-descriptor {{PID}}`
|
||||||
|
|
|
@ -20,4 +20,4 @@
|
||||||
|
|
||||||
- Print out a list of top 5 cpu using processes every second.
|
- Print out a list of top 5 cpu using processes every second.
|
||||||
|
|
||||||
`prstat -c -n 5 -s cpu 1`
|
`prstat -c -n 5 -s cpu 1`
|
||||||
|
|
|
@ -20,4 +20,4 @@
|
||||||
|
|
||||||
- clear a service from maintenance state and command it to start
|
- clear a service from maintenance state and command it to start
|
||||||
|
|
||||||
`svcadm clear {{service_name}}`
|
`svcadm clear {{service_name}}`
|
||||||
|
|
Loading…
Add table
Reference in a new issue