Re: ignoring comments in a 'cat' call

2009-10-08 Thread Bob Proulx
Tamlyn1978 wrote: > I have a file with a list of programs with comments describing what they do, > e.g. > > unison # file syncronisation > grass # gis program > > I have a script, which I run as root and includes the command: > > m...@me:~$ aptitude install $(cat programs) -y > > where 'program

Re: Cannot form valid test expressions that involve brackets as string comparison targets

2009-10-08 Thread Greg Wooledge
On Wed, Oct 07, 2009 at 08:07:19PM +1030, Lyall Pearce wrote: > Description: > Cannot form expressions which involve left or right brackets. Parentheses? > Repeat-By: > > basePic="(2008-04)" > if [ "${basePic:0:1}" = '(' -a "${basePic:4:1}" = ')' ] > then > echo "Got

Re: Cannot form valid test expressions that involve brackets as string comparison targets

2009-10-08 Thread Andreas Schwab
Lyall Pearce writes: > Repeat-By: > > basePic="(2008-04)" > if [ "${basePic:0:1}" = '(' -a "${basePic:4:1}" = ')' ] > then > echo "Got brackets" > fi case $basePic in "("???")"*) echo "Got brackets";; esac > Fix: > Unsure, I think the bracket parsing should