Dumb Bash Script question
Kevin Fries
kfries6 at gmail.com
Wed May 25 21:07:31 MST 2011
value=$(command)
On May 25, 2011 9:57 PM, "Dazed_75" <lthielster at gmail.com> wrote:
> In a bash script, how can I set the contents of a variable to the result
of:
>
> mount | grep tftpboot | wc | cut -c 5-8
>
> In case more info would help, the current script is
>
> #! /bin/bash
> #
> # count the number of mounts in /tftpboot/iso/ each minute
> # ^C to end
> while :
> do
> ans=$(( 12 ))
> date +"%A %H:%2M # .ISOs loop mounted= $ans"
> mount | grep tftpboot | wc | cut -c 5-8
> sleep 60
> done
>
> which puts the count of files mounted on a separate line. If I could make
> $ans contain the result it cane be printed by the date command in the same
> line.
>
> --
> Dazed_75 a.k.a. Larry
>
> The spirit of resistance to government is so valuable on certain
occasions,
> that I wish it always to be kept alive.
> - Thomas Jefferson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.PLUG.phoenix.az.us/pipermail/plug-discuss/attachments/20110525/0520cf66/attachment.html>
More information about the PLUG-discuss
mailing list