How To Preserve Quotes In Bash Arguments

If you want to preserve quoting to pass shell arguments to a called command, use the four characters “$@” (including the double quotes) instead of the two characters $*
![]() |
If you want to preserve quoting to pass shell arguments to a called command, use the four characters “$@” (including the double quotes) instead of the two characters $*
1 2 3 |
vi /etc/postfix/master.cf bounce unix - - n - 0 discard defer unix - - n - 0 discard |
Situation: Newbie mistake, used copy-and-paste to create a script that used variables with the incorrect variable name, then ran chown -R / OUCH Resolution: Since I had aa clone host nearby, I decided to export the remote root fs via NFS, mount it on the fouled nnode, and use find magic to repair. Here are […]
Try a newer browser before anything else! I was using an older version of Safari on Mac and got this:
1 2 3 4 5 6 7 |
If you're seeing this Grafana has failed to load its application files 1. This could be caused by your reverse proxy settings. 2. If you host grafana under subpath make sure your grafana.ini root_url setting includes subpath. If not using a reverse proxy make sure to set serve_from_sub_path to true. 3. If you have a local dev build make sure you build frontend using: yarn start, yarn start:hot, or yarn build 4. Sometimes restarting grafana-server can help 5. Check if you are using a non-supported browser. For more information, refer to the list of supported browsers. |
I switched to the latest version of FireFox and was fine.
If you are asked “Are you sure you want to continue connecting (yes/no)?” when trying to connect via SSH, then the remote host’s identification key has not yet been stored in your ~/.ssh/known_hosts file. This then requires you to type the full string “yes” in order to proceed because the default value for ssh is […]
I needed to block email based on the Subject header. The solution is simple: Edit main.cf as root and uncomment or add:
1 |
header_checks = regexp:/etc/postfix/header_checks |
Next, creaate or edit /etc/postfix/header_checks as root and add the following line:
1 2 |
/subject:\sbad subject text here/ REJECT header_checks NO SPAM ALLOWED /subject:\stest subject text here/ DISCARD header_checks NO SPAM ALLOWED |
Finally, run sudo postfix reload NOTE: Do NOT add the “i” after the regular expression! It is case-insensitive by […]
Use AutoRaise! From the docs: “When you hover a window it will be raised to the front (with a delay of your choosing) and gets the focus.” Web page: https://github.com/sbmpost/AutoRaise Download: https://github.com/sbmpost/AutoRaise/archive/refs/heads/master.zip
1 2 3 |
unzip -d ~ ~/Downloads/AutoRaise-master.zip cd ~/AutoRaise-master && make clean && make make install |
My ~/.AutoRaise file:
1 2 |
#AutoRaise config file delay=3 |
I needed a way to get the dock icon to bounce for all incoming emails and there did not seem to be any option to do so. There is actually a simple way to do it, but it is not intuitive. The key is to add a new Rule! Open Mail.app and choose Mail -> […]
The aws s3 sync command is slow and painful! I needed a more efficient way to sync to large buckets (prod to dev). Finally settled on RClone: https://rclone.org/docs/
1 2 3 |
cd {extracted zip dir} ./rclone config cat ~/.config/rclone/rclone.conf |
During rclone config I called remote “s3” ;-}
1 |
./rclone sync -v --progress --fast-list --checksum s3:wyzaerd-demo-prod s3:wyzaerd-demo-dev |
There are three commands in Linux to easily get a reverse DNS lookup with: dig, host and nslookup. Here are examples of each: shell> dig -x 3.214.2.238 +short
1 |
ns3.wyzaerd.info. |
shell> dig -x 3.214.2.238
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.68.rc1.86.amzn1 <<>> -x 3.214.2.238 ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 19300 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;238.2.214.3.in-addr.arpa. IN PTR ;; ANSWER SECTION: 238.2.214.3.in-addr.arpa. 300 IN PTR ns3.wyzaerd.info. ;; Query time: 8 msec ;; SERVER: 10.0.0.2#53(10.0.0.2) ;; WHEN: Wed Sep 1 19:43:56 2021 ;; MSG SIZE rcvd: 72 |
shell> host 3.214.2.238
1 |
238.2.214.3.in-addr.arpa domain name pointer ns3.wyzaerd.info. |
shell> nslookup 3.214.2.238
1 2 3 4 5 |
Server: 10.0.0.2 Address: 10.0.0.2#53 Non-authoritative answer: 238.2.214.3.in-addr.arpa name = ns3.wyzaerd.info. |