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 > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Command not found BigTool4u2 UNIX for Dummies Questions & Answers 2 03-08-2008 02:40 AM
Command not found manna UNIX for Dummies Questions & Answers 20 01-10-2008 11:29 AM
cc command not found mishra_sk_in UNIX for Dummies Questions & Answers 4 08-14-2007 05:00 AM
how can i check in csh if command found or not found ? umen Shell Programming and Scripting 2 03-03-2007 07:38 PM
xlf: command not found!!!! mzzt AIX 2 01-05-2006 05:19 PM

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 06-17-2006
coolboarderguy coolboarderguy is offline
Registered User
  
 

Join Date: Dec 2005
Posts: 7
Post sh: Hello: command not found

Hi All,

I got this below,
Code:
sudo ./myvar sh-3.1
# Hello You
sh: Hello: command not found
sh-3.1#
sh-3.1#
sh-3.1# exit
Hi there
Hi there
$myvar
$myvar
Enter some text
Hello World
$myvar now equals Hello World

for this code,
Code:
/bin/sh

myvar="Hi there"

echo $myvar
echo "$myvar"
echo '$myvar'
echo \$myvar

echo Enter some text
read myvar

echo '$myvar' now equals $myvar
exit 0

from Beginning Linux Programming Third Edition.

Why did it jump to sh-3.1# and give the command not found error? After ctrl-d it then allowed me to enter some text for the read call and ran the code correctly. Confused. Cheers.

coolboarderguy...

Last edited by coolboarderguy; 06-17-2006 at 12:43 AM..
  #2 (permalink)  
Old 06-17-2006
reborg's Avatar
reborg reborg is offline Forum Staff  
Administrator
  
 

Join Date: Mar 2005
Location: Ireland
Posts: 4,206
because the first line is incorrect, look carefully at it.
  #3 (permalink)  
Old 06-24-2006
coolboarderguy coolboarderguy is offline
Registered User
  
 

Join Date: Dec 2005
Posts: 7
Hi All,

DOH!! Cheers.

coolboarderguy...
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 02:32 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