The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Shell Script Error jazz8146 UNIX for Dummies Questions & Answers 0 04-23-2008 07:38 AM
awk Shell Script error : "Syntax Error : `Split' unexpected Herry UNIX for Dummies Questions & Answers 2 03-17-2008 11:16 AM
FTP shell script error caturing im_new Shell Programming and Scripting 6 01-15-2008 03:21 AM
error in shell script jalpan.pota UNIX for Dummies Questions & Answers 2 05-18-2007 09:14 AM
How to bypass error in shell script? tmikahan Shell Programming and Scripting 1 05-08-2007 06:15 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 07-02-2008
alias_juju alias_juju is offline
Registered User
  
 

Join Date: Jul 2008
Posts: 5
shell script error

Originally I posted this to the shell script forum but it is probably better suited here.

For the life of me I cannot get the if statement in this very simple shell script to execute.

my dummy.sh looks as follows ...
#!/bin/bash
echo "coming in ...."
echo "I can not get this simple statement to execute"
if [ "foo" = "foo" ]; then
echo "expression is true"
fi
echo "leaving...."

the output I'm getting is when running the script is ...

coming in ....
I can not get this simple statement to execute
dummy_g5.sh: line 9: syntax error: unexpected end of file

Appreciate your help.
  #2 (permalink)  
Old 07-02-2008
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,717
As you have typed the script, it runs for me if I copy it off the screen. You may have a typo in the script that is not in the text here shown or hidden non-printing junk characters in your text.
  #3 (permalink)  
Old 07-02-2008
Franklin52 Franklin52 is offline Forum Staff  
Moderator
  
 

Join Date: Feb 2007
Posts: 4,293
This is a duplicate of this thread:

missing the obvious, unexpected end of file

No duplicate or cross-posting, read the Simple rules of the UNIX.COM forums:.

Thread closed.

Last edited by Franklin52; 07-02-2008 at 01:28 PM..
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:34 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0