Bulk change: move double quotes outside tokens (#4431)

This commit is contained in:
Guido Lena Cota
2020-10-04 19:33:38 +02:00
committed by GitHub
parent cfe462c57f
commit 354d4b8748
59 changed files with 118 additions and 118 deletions

View File

@@ -4,11 +4,11 @@
- Print the text message as a large banner (quotes are optional):
`banner {{"Hello World"}}`
`banner "{{Hello World}}"`
- Print the text message as a banner with a width of 50 characters:
`banner -w {{50}} {{"Hello World"}}`
`banner -w {{50}} "{{Hello World}}"`
- Read text from `stdin`:

View File

@@ -14,4 +14,4 @@
- Find rows in which the "name" column does NOT include the string "John Doe":
`csvgrep -i -c {{name}} -m {{"John Doe"}} {{data.csv}}`
`csvgrep -i -c {{name}} -m "{{John Doe}}" {{data.csv}}`

View File

@@ -4,20 +4,20 @@
- Print a text message. Note: quotes are optional:
`echo {{"Hello World"}}`
`echo "{{Hello World}}"`
- Print a message with environment variables:
`echo {{"My path is $PATH"}}`
`echo "{{My path is $PATH}}"`
- Print a message without the trailing newline:
`echo -n {{"Hello World"}}`
`echo -n "{{Hello World}}"`
- Append a message to the file:
`echo {{"Hello World"}} >> {{file.txt}}`
`echo "{{Hello World}}" >> {{file.txt}}`
- Enable interpretation of backslash escapes (special characters):
`echo -e {{"Column 1\tColumn 2"}}`
`echo -e "{{Column 1\tColumn 2}}"`

View File

@@ -13,7 +13,7 @@
- Create a private gist with a description:
`gist -p -d {{"A meaningful description"}} {{file.txt}} `
`gist -p -d "{{A meaningful description}}" {{file.txt}} `
- Read contents from `stdin` and create a gist from it:

View File

@@ -13,11 +13,11 @@
- Show commits made since 1 week ago:
`gitk --since={{"1 week ago"}}`
`gitk --since="{{1 week ago}}"`
- Show commits older than 1/1/2016:
`gitk --until={{"1/1/2015"}}`
`gitk --until="{{1/1/2015}}"`
- Show at most 100 changes in all branches:

View File

@@ -17,7 +17,7 @@
- View everything that happened from the start of last year to the start of last march:
`jrnl -from {{"last year"}} -until {{march}}`
`jrnl -from "{{last year}}" -until {{march}}`
- Edit all entries tagged with "texas" and "history":

View File

@@ -5,12 +5,12 @@
- Send a typed email message. The commandline below continues after pressing Enter key. Input CC email-id (optional) press Enter key. Input message text (can be multi-line). Press "Ctrl-D" key to complete the message text:
`mail --subject={{"subject line"}} {{to_user@example.com}}`
`mail --subject="{{subject line}}" {{to_user@example.com}}`
- Send an email that contains file content:
`mail --subject={{"$HOSTNAME filename.txt"}} {{to_user@example.com}} < {{path/to/filename.txt}}`
`mail --subject="{{$HOSTNAME filename.txt}}" {{to_user@example.com}} < {{path/to/filename.txt}}`
- Send a tar.gz file as an attachment:
`tar cvzf - {{path/to/directory1 path/to/directory2}} | uuencode {{data.tar.gz}} | mail --subject={{"subject line"}} {{to_user@example.com}}`
`tar cvzf - {{path/to/directory1 path/to/directory2}} | uuencode {{data.tar.gz}} | mail --subject="{{subject line}}" {{to_user@example.com}}`

View File

@@ -10,7 +10,7 @@
- Filter a saved traffic file to just POST requests:
`mitmdump -nr {{input_filename}} -w {{output_filename}} {{"~m post"}}`
`mitmdump -nr {{input_filename}} -w {{output_filename}} "{{~m post}}"`
- Replay a saved traffic file:

View File

@@ -17,7 +17,7 @@
- Generate wildcard certificate and private key for a given domain and its subdomains:
`mkcert {{"*.example.it"}}`
`mkcert "{{*.example.it}}"`
- Uninstall the local CA:

View File

@@ -8,12 +8,12 @@
- Copy report6part4.txt to ./french/rapport6partie4.txt along with all similarly named files:
`mmv -c {{"report*part*.txt"}} {{"./french/rapport#1partie#2.txt"}}`
`mmv -c "{{report*part*.txt}}" "{{./french/rapport#1partie#2.txt}}"`
- Append all .txt files into one file:
`mmv -a {{"*.txt"}} {{"all.txt"}}`
`mmv -a "{{*.txt}}" "{{all.txt}}"`
- Convert dates in filenames from "M-D-Y" format to "D-M-Y" format:
`mmv {{"[0-1][0-9]-[0-3][0-9]-[0-9][0-9][0-9][0-9].txt"}} {{"#3#4-#1#2-#5#6#7#8.txt"}}`
`mmv "{{[0-1][0-9]-[0-3][0-9]-[0-9][0-9][0-9][0-9].txt}}" "{{#3#4-#1#2-#5#6#7#8.txt}}"`

View File

@@ -9,11 +9,11 @@
- Publish timestamp and temperature data on the topic `sensors/temperature` to a remote host on a non-standard port:
`mosquitto_pub -h {{192.168.1.1}} -p {{1885}} -t {{sensors/temperature}} -m {{"1266193804 32"}}`
`mosquitto_pub -h {{192.168.1.1}} -p {{1885}} -t {{sensors/temperature}} -m "{{1266193804 32}}"`
- Publish light switch status and retain the message on the topic `switches/kitchen_lights/status` to a remote host because there may be a long period of time between light switch events:
`mosquitto_pub -r -h {{"iot.eclipse.org"}} -t {{switches/kitchen_lights/status}} -m {{"on"}}`
`mosquitto_pub -r -h "{{iot.eclipse.org}}" -t {{switches/kitchen_lights/status}} -m "{{on}}"`
- Send the contents of a file (`data.txt`) as a message and publish it to `sensors/temperature` topic:

View File

@@ -6,12 +6,12 @@
- Send an email using the default account configured in `~/.msmtprc`:
`echo {{"Hello world"}} | msmtp {{to@example.org}}`
`echo "{{Hello world}}" | msmtp {{to@example.org}}`
- Send an email using a specific account configured in `~/.msmtprc`:
`echo {{"Hello world"}} | msmtp --account={{account_name}} {{to@example.org}}`
`echo "{{Hello world}}" | msmtp --account={{account_name}} {{to@example.org}}`
- Send an email without a configured account. The password should be specified in the `~/.msmtprc` file:
`echo {{"Hello world"}} | msmtp --host={{localhost}} --port={{999}} --from={{from@example.org}} {{to@example.org}}`
`echo "{{Hello world}}" | msmtp --host={{localhost}} --port={{999}} --from={{from@example.org}} {{to@example.org}}`

View File

@@ -13,4 +13,4 @@
- Convert to IEC units, pad with 5 characters, left aligned:
`du -s * | numfmt --to={{iec}} --format={{"%-5f"}}`
`du -s * | numfmt --to={{iec}} --format="{{%-5f}}"`

View File

@@ -4,19 +4,19 @@
- Print a text message:
`printf {{"%s\n"}} {{"Hello world"}}`
`printf "{{%s\n}}" "{{Hello world}}"`
- Print an integer in bold blue:
`printf {{"\e[1;34m%.3d\e[0m\n"}} {{42}}`
`printf "{{\e[1;34m%.3d\e[0m\n}}" {{42}}`
- Print a float number with the unicode Euro sign:
`printf {{"\u20AC %.2f\n"}} {{123.4}}`
`printf "{{\u20AC %.2f\n}}" {{123.4}}`
- Print a text message composed with environment variables:
`printf {{"var1: %s\tvar2: %s\n"}} {{"$VAR1"}} {{"$VAR2"}}`
`printf "{{var1: %s\tvar2: %s\n}}" "{{$VAR1}}" "{{$VAR2}}"`
- Store a formatted message in a variable (does not work on zsh):

View File

@@ -28,7 +28,7 @@
- Display a prompt before the input:
`read -p {{"Enter your input here: "}} {{variable}}`
`read -p "{{Enter your input here: }}" {{variable}}`
- Do not echo typed characters (silent mode):

View File

@@ -17,7 +17,7 @@
- Load scheme expressions into the REPL:
`scheme --eval {{"(define foo 'x)"}}`
`scheme --eval "{{(define foo 'x)}}"`
- Open the REPL in quiet mode:

View File

@@ -16,4 +16,4 @@
- Compile a shell script and set a message to display upon expiration:
`shc -f {{script}} -e {{dd/mm/yyyy}} -m {{"Please contact your provider"}}`
`shc -f {{script}} -e {{dd/mm/yyyy}} -m "{{Please contact your provider}}"`

View File

@@ -5,20 +5,20 @@
- Run sqlmap against a single target URL:
`python sqlmap.py -u {{"http://www.target.com/vuln.php?id=1"}}`
`python sqlmap.py -u "{{http://www.target.com/vuln.php?id=1}}"`
- Send data in a POST request (`--data` implies POST request):
`python sqlmap.py -u {{"http://www.target.com/vuln.php"}} --data={{"id=1"}}`
`python sqlmap.py -u "{{http://www.target.com/vuln.php}}" --data="{{id=1}}"`
- Change the parameter delimiter (& is the default):
`python sqlmap.py -u {{"http://www.target.com/vuln.php"}} --data={{"query=foobar;id=1"}} --param-del={{";"}}`
`python sqlmap.py -u "{{http://www.target.com/vuln.php}}" --data="{{query=foobar;id=1}}" --param-del="{{;}}"`
- Select a random `User-Agent` from `./txt/user-agents.txt` and use it:
`python sqlmap.py -u {{"http://www.target.com/vuln.php"}} --random-agent`
`python sqlmap.py -u "{{http://www.target.com/vuln.php}}" --random-agent`
- Provide user credentials for HTTP protocol authentication:
`python sqlmap.py -u {{"http://www.target.com/vuln.php"}} --auth-type {{Basic}} --auth-cred {{"testuser:testpass"}}`
`python sqlmap.py -u "{{http://www.target.com/vuln.php}}" --auth-type {{Basic}} --auth-cred "{{testuser:testpass}}"`

View File

@@ -34,7 +34,7 @@
- Extract files matching a pattern:
`tar xf {{source.tar}} --wildcards {{"*.html"}}`
`tar xf {{source.tar}} --wildcards "{{*.html}}"`
- Extract a specific file without preserving the folder structure:

View File

@@ -17,7 +17,7 @@
- Start torrent 1 and 2, stop torrent 3:
`transmission-remote {{hostname}} -t {{"1,2"}} --start -t {{3}} --stop`
`transmission-remote {{hostname}} -t "{{1,2}}" --start -t {{3}} --stop`
- Remove torrent 1 and 2, and also delete local data for torrent 2:
@@ -29,4 +29,4 @@
- Move torrents 1-10 and 15-20 to a new folder (folder will be created if it does not exist):
`transmission-remote {{hostname}} -t {{"1-10,15-20"}} --move {{path/to/new_directory}}`
`transmission-remote {{hostname}} -t "{{1-10,15-20}}" --move {{path/to/new_directory}}`

View File

@@ -13,7 +13,7 @@
- Download a video or playlist at a specific quality:
`youtube-dl --format {{"best[height<=480]"}} {{https://www.youtube.com/watch?v=oHg5SJYRHA0}}`
`youtube-dl --format "{{best[height<=480]}}" {{https://www.youtube.com/watch?v=oHg5SJYRHA0}}`
- Download the audio from a video and convert it to an MP3:
@@ -25,7 +25,7 @@
- Download video(s) as MP4 files with custom filenames:
`youtube-dl --format {{mp4}} -o {{"%(title)s by %(uploader)s on %(upload_date)s in %(playlist)s.%(ext)s"}} {{url}}`
`youtube-dl --format {{mp4}} -o "{{%(title)s by %(uploader)s on %(upload_date)s in %(playlist)s.%(ext)s}}" {{url}}`
- Download a particular language's subtitles along with the video:

View File

@@ -17,4 +17,4 @@
- Convert a C-style calculation:
`bitwise {{"0x123 + 0x20 - 30 / 50"}}`
`bitwise "{{0x123 + 0x20 - 30 / 50}}"`

View File

@@ -5,15 +5,15 @@
- Show a notification with a given title and message:
`dunstify {{"Title"}} {{"Message"}}`
`dunstify "{{Title}}" "{{Message}}"`
- Show a notification with specified urgency:
`dunstify {{"Title"}} {{"Message}}" -u {{low|normal|critical}}`
`dunstify "{{Title}}" "{{Message}}" -u {{low|normal|critical}}`
- Specify a message ID (overwrites any previous messages with the same ID):
`dunstify {{"Title"}} {{"Message"}} -r {{123}}`
`dunstify "{{Title}}" "{{Message}}" -r {{123}}`
- To see other possible options:

View File

@@ -4,4 +4,4 @@
- Change the volume label on a specific ext partition:
`e2label {{/dev/sda1}} {{"label_name"}}`
`e2label {{/dev/sda1}} "{{label_name}}"`

View File

@@ -9,11 +9,11 @@
- Set the title of an MP3 file:
`eyeD3 --title {{"A Title"}} {{filename.mp3}}`
`eyeD3 --title "{{A Title}}" {{filename.mp3}}`
- Set the album of all the MP3 files in a directory:
`eyeD3 --album {{"Album Name"}} {{*.mp3}}`
`eyeD3 --album "{{Album Name}}" {{*.mp3}}`
- Set the front cover art for an MP3 file:

View File

@@ -9,4 +9,4 @@
- Set the disc label when creating an ISO:
`mkisofs -o {{filename.iso}} -V {{"label_name"}} {{path/to/source_directory}}`
`mkisofs -o {{filename.iso}} -V "{{label_name}}" {{path/to/source_directory}}`

View File

@@ -4,16 +4,16 @@
- Show a notification with the title "Test" and the content "This is a test":
`notify-send {{"Test"}} {{"This is a test"}}`
`notify-send "{{Test}}" "{{This is a test}}"`
- Show a notification with a custom icon:
`notify-send -i {{icon.png}} {{"Test"}} {{"This is a test"}}`
`notify-send -i {{icon.png}} "{{Test}}" "{{This is a test}}"`
- Show a notification for 5 seconds:
`notify-send -t 5000 {{"Test"}} {{"This is a test"}}`
`notify-send -t 5000 "{{Test}}" "{{This is a test}}"`
- Show a notification with an app's icon:
`notify-send {{"Test"}} --icon={{google-chrome}}`
`notify-send "{{Test}}" --icon={{google-chrome}}`

View File

@@ -13,7 +13,7 @@
- Create a snapshot with a description:
`snapper -c {{config}} create -d {{"snapshot_description"}}`
`snapper -c {{config}} create -d "{{snapshot_description}}"`
- List snapshots for a config:

View File

@@ -8,7 +8,7 @@
- Set the local time of the system clock directly:
`timedatectl set-time {{"yyyy-MM-dd hh:mm:ss"}}`
`timedatectl set-time "{{yyyy-MM-dd hh:mm:ss}}"`
- List available timezones:

View File

@@ -17,7 +17,7 @@
- Allow incoming traffic on port 5432 on this host with a comment identifying the service:
`ufw allow {{5432}} comment {{"Service"}}`
`ufw allow {{5432}} comment "{{Service}}"`
- Allow only TCP traffic from 192.168.0.4 to any address on this host, on port 22:

View File

@@ -17,8 +17,8 @@
- Show the conversion between two compound units:
`units {{"meters / second"}} {{"inches / hour"}}`
`units "{{meters / second}}" "{{inches / hour}}"`
- Show the conversion between units with different dimensions:
`units {{"acres"}} {{"ft^2"}}`
`units "{{acres}}" "{{ft^2}}"`

View File

@@ -16,4 +16,4 @@
- Only yank fields matching a specific pattern:
`{{ps ux}} | yank -g {{"[0-9]+"}}`
`{{ps ux}} | yank -g "{{[0-9]+}}"`

View File

@@ -4,7 +4,7 @@
- Sign an application with a certificate:
`codesign -s {{"My Company Name"}} {{/path/to/App.app}}`
`codesign -s "{{My Company Name}}" {{/path/to/App.app}}`
- Verify the certificate of an application:

View File

@@ -8,7 +8,7 @@
- Show network settings for a particular networking device:
`networksetup -getinfo {{"Wi-Fi"}}`
`networksetup -getinfo "{{Wi-Fi}}"`
- Get currently connected Wi-Fi network name (Wi-Fi device usually en0 or en1):
@@ -16,4 +16,4 @@
- Connect to a particular Wi-Fi network:
`networksetup -setairportnetwork {{en0}} {{"Airport Network SSID"}} {{password}}`
`networksetup -setairportnetwork {{en0}} "{{Airport Network SSID}}" {{password}}`

View File

@@ -4,7 +4,7 @@
- Say a phrase aloud:
`say {{"I like to ride my bike."}}`
`say "{{I like to ride my bike.}}"`
- Read a file aloud:
@@ -12,7 +12,7 @@
- Say a phrase with a custom voice and speech rate:
`say -v {{voice}} -r {{words_per_minute}} {{"I'm sorry Dave, I can't let you do that."}}`
`say -v {{voice}} -r {{words_per_minute}} "{{I'm sorry Dave, I can't let you do that.}}"`
- List the available voices:
@@ -20,4 +20,4 @@
- Create an audio file of the spoken text:
`say -o {{filename.aiff}} {{"Here's to the Crazy Ones."}}`
`say -o {{filename.aiff}} "{{Here's to the Crazy Ones.}}"`

View File

@@ -12,16 +12,16 @@
- Convert between units with quantities:
`units {{"15 pounds"}} {{kilograms}}`
`units "{{15 pounds}}" {{kilograms}}`
- Show the conversion between two compound units:
`units {{"meters / second"}} {{"inches / hour"}}`
`units "{{meters / second}}" "{{inches / hour}}"`
- Show the conversion between units with different dimensions:
`units {{"acres"}} {{"ft^2"}}`
`units "{{acres}}" "{{ft^2}}"`
- Show the conversion of byte multipliers:
`units {{"15 megabytes"}} {{bytes}}`
`units "{{15 megabytes}}" {{bytes}}`

View File

@@ -16,4 +16,4 @@
- Only yank fields matching a specific pattern:
`{{ps ux}} | yank -g {{"[0-9]+"}}`
`{{ps ux}} | yank -g "{{[0-9]+}}"`

View File

@@ -18,4 +18,4 @@
- Create an event in a remote machine's event log:
`eventcreate /s {{hostname}} /u {{username}} /p {{password}} /t {{type}} /id {{id}} /d "{{message"}}`
`eventcreate /s {{hostname}} /u {{username}} /p {{password}} /t {{type}} /id {{id}} /d "{{message}}"`

View File

@@ -16,8 +16,8 @@
- Show the conversion between two compound units:
`units {{"meters / second"}} {{"inches / hour"}}`
`units "{{meters / second}}" "{{inches / hour}}"`
- Show the conversion between units with different dimensions:
`units {{"acres"}} {{"ft^2"}}`
`units "{{acres}}" "{{ft^2}}"`