Script not working
Florian Diesch
diesch at spamfence.net
Thu Aug 13 17:25:35 UTC 2009
Ray Parrish <crp at cmc.net> writes:
> Hello,
>
> I am having difficulty with a bash script. I want to loop through a file
> line by line looking for a certain word or phrase to be on a line. When
> I find the match, I want to load the next line into xclip.
>
> Here is my code so far -
>
> #!/bin/sh
> saved=" "
> while read f
> do
> echo $f
> echo $1
> if "${1}" = "${saved}" ; then
This has to be
if [ "${1}" = "${saved}" ] ; then
Florian
--
<http://www.florian-diesch.de/>
More information about the ubuntu-users
mailing list