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: