shell scripting book

 The following code will read the line into a variable called message, looping around until there is no more input (read returns non-zero if an end-of-file was read, so the while loop ends — this will be looked at in greater detail in Chapter 6).

$ while read message
>
do
>
echo $message
> done < /etc/motd

Comments

Popular posts from this blog

HAproxy logging

teamcity Automatic Agent Start under Linux

NFS mount add in fstab _netdev instead of default | firewall-cmd --list-all