BASH query

Nils Kassube kassube at gmx.net
Wed Jul 11 20:50:43 UTC 2007


dave selby wrote:
> Hi all,
>
> I need to set a BASH variable val to the contents of a small line of
> ASCII in a file called 'version',
>
> ie something like ...
>
> val=$(cat version)
>
> except the above does not work !!

Try

read val <version


Nils




More information about the ubuntu-users mailing list