unexpected token error

From: Reuben (reuben_at_presence-systems.com)
Date: 07/20/05


Date: 20 Jul 2005 02:57:35 -0700

Why do I get the errors:

./test.sh: line 8: syntax error near unexpected token `$filelist'
./test.sh: line 8: `done < cat $filelist'

when I run this script...

#/!bin/bash
#Set the name of the temporary filelist name
filelist="filelist1.txt"

while read line
do
        echo $line | awk ' { print $1 } '
done < cat $filelist

What's the correct way to do this?

Regards

Reuben
reuben@presence-systems.com



Relevant Pages

  • Re: Also on automatic semi-colon insertion ...
    ... the source code as a /Program/ if it encounters a syntax error. ... Obviously they don't say how the report is displayed. ... We are talking about a programming language here; ... However, HTML SCRIPT elements are ...
    (comp.lang.javascript)
  • Re: I need to generate list of all SMTP address.
    ... the email addresses (including aliases) so I can give the list to SPAM ... In regards to JamesTech's script, ... syntax error, "exportmail.vbsMS VBScript compilation error: ...
    (microsoft.public.exchange.admin)
  • Re: Using ":" as argument
    ... shorter one has a syntax error, ... The following lines are the portion of the script that contain the ... ordflag=1 # this flag is set to 1 to call reverse order function ... then printf "You must enter two integers. ...
    (comp.unix.shell)
  • Re: I need to generate list of all SMTP address.
    ... For Each Item in strProxyAddress ... In regards to JamesTech's script, ... syntax error, "exportmail.vbsMS VBScript compilation error: ...
    (microsoft.public.exchange.admin)
  • Re: Legacy code/browser compatibility
    ... ancient browsers may see a syntax error reported. ... The problem is that the inital branch is either script ... In the case of ancient browsers, ... You can surely script to support browsers older than NN3, ...
    (comp.lang.javascript)