the following script assumes that you have the az command installed on your mac. if you have installed it using homebrew then it copies the auto-completion file to the location /opt/homebrew/etc/bash_completion.d/az already. all we have to do is to make it auto load on zsh startup. copy and paste the following command to do it. restart your zsh (cmd+q) after entering this command.
(more…)Blog
-
until … done loop in gnu/bash
bash has three types of loop constructs
(more…)
– for
– while
– until
until loop is used to iterate over the body of the loop till the condition stays false. -
configure docker host with remote api on your linux machine
step 1: install docker engine. follow steps for your os from the docker documentation here – https://docs.docker.com/engine/install/
(more…) -
swap file appears to have holes
error message –
(more…)root@host:~# swapon /swap-file-00 swapon: /swap-file-00: skipping - it appears to have holes. -
unexport/remove a variable in the shell
say you have assigned some value to a variable from the shell or a shell script using the export command and now you want to remove that variable, either programatically or manually.
(more…) -
list all versions of an available package using yum/dnf
dnf list <packagename> --showduplicates
(more…) -
autofs mounts
autofs is a nice traditional way to mount the nfs directories on-demand on the nfs clients. was originally used to mount the user home directories to the clients to make them sort of roaming user profiles, but this doesnt stop us from using it to configure nfs mounts in other ways. using autofs saves unnecessary resource allocation to mount the resources on a client machine, which may never be accessed in that session. it also saves the open handles on the nfs server, which is another plus.
(more…) -
selinux prevents mounted directories for serving content for httpd
error message
(13)Permission denied: [client <ipaddress>:<port>] AH00035: access to /index.html denied (filesystem path '/opt/rh/httpd24/root/var/www/html/index.html') because search permissions are missing on a component of the path
(more…) -
awk tricks
some of the awk tricks listed here. might come in handy in any of my future shell scripts.
(more…)