Help answer threads with 0 replies.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


Closed Thread
  Search this Thread
Old 11-03-2003, 11:34 AM   #1
LQ Newbie
Registered: Nov 2003
Posts: 2

Rep: Reputation: 0
Unhappy error: unexpected token `newline'

Hi all,

when i run this line in shell works ok:

cat /userdir/file.conf | sed "s/" > /userdir/file.conf1

but i want to add it in a shell script, and when i run it i got an error:

./test: line 2: syntax error near unexpected token `newline'
./test: line 2: `cat /userdir/file.conf | sed "s/" >'

my script is this:

cat /userdir/file.conf | sed "s/" >

i hope someone can help me finding where my error is or what i need to change to run it in a script

Thank You
Carlos V.
Old 11-03-2003, 11:37 AM   #2
Registered: Sep 2002
Location: OH, USA
Distribution: 2.6.16-1.2096_FC5 #1
Posts: 245

Rep: Reputation: 30
move the third line to the end of the second

if it is imperitive that this line (the third one) be seperate for some reason have to change it to this:

cat /userdir/file.conf | sed "s/" >\

Last edited by jhorvath; 11-03-2003 at 11:38 AM.
Old 11-03-2003, 12:06 PM   #3
LQ Newbie
Registered: Nov 2003
Posts: 2

Original Poster
Rep: Reputation: 0
It works Thank You Jeremy
Old 05-17-2011, 03:14 AM   #4
LQ Newbie
Registered: May 2011
Posts: 1

Rep: Reputation: 0
unexpected token 'newline'

when i run this lines in shell works ok:
echo "[Desktop Entry]
Name=No Name
X-GNOME-Autostart-enabled=true" >
0 members found this post helpful.
Old 05-17-2011, 03:47 AM   #5
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
Don't drag up 8 year old threads. new question = new thread. Not that you've even asked a question at all.

Closed Thread

cloud, install, key, public, ssh, users

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
syntax error near unexpected token `fi' Warmduvet Programming 21 10-08-2013 10:28 AM
Authentication Token Manipulation Error manfernandez Linux - Security 10 06-06-2008 11:49 AM
Many errors when 'make'ing (example: error: syntax error before `::' token) darkblade Linux - Software 5 03-02-2005 03:00 PM
authentication token manipulation error abuelmaati Linux - Newbie 3 02-04-2005 07:21 AM
Undecodable token error ?? Thymox Linux - General 3 11-18-2002 06:11 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:32 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration