On Wed, 7 Oct 2009, 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 'programs' is the file with the list of programs. Aptitude does not > ignore the '#' comments, reading them, and the subsequent comment text as > package files. > > Is there a way to make 'cat' ignore the comments or is there a better > alternative to cat in this case?
aptitude install $(cut -d ' ' -f1 programs) -y -- Chris F.A. Johnson, webmaster <http://woodbine-gerrard.com> =================================================================== Author: Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)