bash has three types of loop constructs
– for
– while
– until
until loop is used to iterate over the body of the loop till the condition stays false.
Category: Linux
linux is a family of open-source Unix-like operating systems based on the linux kernel, first released on September 17, 1991, by Linus Torvalds. it is typically packaged as a distribution, which includes the kernel and supporting system software and libraries, many of them provided by the gnu project.
-
until … done loop in gnu/bash
-
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…) -
gpg2 – using the OpenPGP encryption and signing tool to encrypt and decrypt
most standard versions of linux distro’s come with the newer gpg2 command comes by default. the previous version of gpg is linked to the newer gpg2 packages. this means you may use the gpg and gpg2 command and it will always run the gpg2 command. an excerpt from a centos 7 below explains that
(more…)