new to linux/Ubuntu/shell scripting . . .
Rachael C.
amaroq3 at gmail.com
Mon Dec 5 19:31:23 UTC 2005
thanks for the tip Scott! It worked! I then added in the sort:
grep -w -e '\(.\)\(.\).\2\1' bigTextFile.txt| sort -d -r > palindromes.txt
It sorted things in the order that I wanted, but its not getting the
palindromes. Its getting the whole text. The example of the
palindrome search I only found in one place. Does anyone know of a
better way?
On 12/5/05, Scott Sweeny <ssweeny at gmail.com> wrote:
> > $ grep -w -e '\(.\)\(.\).\2\1' bigTextFile > palindromes.txt
> > and
> > $ cat palindromes.txt
> >
> > both returned: "./palindromes.sh: line #: $: command not found"
> >
>
> In examples on the web the '$' is generally used to denote a line to
> be typed at the command prompt. Try removing the '$'s and run it.
>
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> http://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>
More information about the ubuntu-users
mailing list