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 |
When I sent email from my desktop Mac cron jobs, it went out with the full hostname as the domain, i.e.: root@demo.wyzaerd.com, when all I wanted was a simple root@wyzaerd.com for ease of deliverability and domain maint. Edit the mail configuration file main.cf:
1 |
vi /etc/postfix/main.cf |
Add/edit the myorigin value of $mydomain:
1 |
myorigin = $mydomain |
Had an old server, needed to get root.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
service mysql stop ~OR~ service mysqld stop cd /etc/init.d; ./mysql<tab> start --skip-grant-tables mysql> update mysql.user set Password=PASSWORD('secret') where user='root'; mysql> flush privileges; mysql> ^D service mysql stop service mysql start ~OR~ service mysqld stop service mysqld start |
For MySQL 5.7: https://dev.mysql.com/doc/refman/5.7/en/resetting-permissions.html For some other v5.7 nodes, I had admin access via a different user’s login, so all I needed was this:
1 2 |
ALTER USER 'root'@'localhost' IDENTIFIED BY 'secret'; ALTER USER 'root'@'%' IDENTIFIED BY 'secret'; |
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.
I went to perform a yum update and got the following error:
1 2 3 4 5 6 7 |
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql The GPG keys listed for the "MySQL 5.7 Community Server" repository are already installed but they are not correct for this package. Check that the correct key URLs are configured for this repository. Failing package is: mysql-community-server-5.7.37-1.el7.x86_64 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql |
SOLUTION: Import the needed new key and manually edit the config files before retrying the yum update.
1 |
rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022 |
I had to edit two files: mysql-community-source.repo and mysql-community.repo
1 |
vi /etc/yum.repos.d/my* |
For 5.7 – add -2022 to the key name: i.e.: ORIGINAL:
1 |
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql |
MODIFY ONE […]
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 use the httpful library from https://phphttpclient.com The website has not defined the Httpful\Response keys anyplace easy to find, so I have documented them here:
1 2 3 4 5 6 7 8 9 10 11 12 |
body raw_body headers raw_headers request code content_type parent_type charset meta_data is_mime_vendor_specific is_mime_personal |
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 […]