example :
diskFreeSpace="$(df | grep -v -E 'Filesystem|udev|tmpfs|Home|/dev/sr1|/dev/sr0' | awk '{ print $5-1+1}')"
and hope if you understand what is this command u help me
example :
diskFreeSpace="$(df | grep -v -E 'Filesystem|udev|tmpfs|Home|/dev/sr1|/dev/sr0' | awk '{ print $5-1+1}')"
and hope if you understand what is this command u help me
the symbol is called a "pipe".
The command df | grep
is "piping" (redirecting) the standard output of the df
command into the standard input of the grep
command. In this example the grep command filters the output of the df command. Then the awk
commands is for display/format purposes.
Inside the regular expression it is specific to the grep syntax since it is surrounded by quotes it is only considered as an argument passed to grep