LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Closed Thread
  Search this Thread
Old 11-10-2009, 03:55 AM   #1
pramod.srk
Member
 
Registered: Feb 2009
Posts: 47

Rep: Reputation: 15
Unhappy Issue with line command in RHEL- 5


Dear All,
I am getting the following error while running a shell script.
./Outline.sh: line 30: line: command not found

The following code snippet giving an error.
while linestr="`line`"; do
param1=`echo $linestr | sed -e 's/^\(.*\)\;\(.*\)\|\(.*\)$/\1/'`
param2=`echo $linestr | sed -e 's/^\(.*\)\;\(.*\)\|\(.*\)$/\2/'`
param3=`echo $linestr | sed -e 's/^\(.*\)\;\(.*\)\|\(.*\)$/\3/'`
echo '/'$param2'/{printf("'$param3' at %s\\n", substr($0,0,20))}' >> $tmpdir/${param1}_$tmpfile
done < $paramfile

"while linestr="`line`"; do" is the line number 30.

I am executing the shell script as follows
$Outline.sh Outline.txt

OS : RHEL-5

Please let me know what is the problem with script.

Thanks and Regards
Pramod
 
Old 11-10-2009, 08:52 AM   #2
chiragrk
Member
 
Registered: Nov 2009
Location: India
Distribution: Xandros, Ubuntu
Posts: 74

Rep: Reputation: 16
Not sure what you're trying to accomplish here - but `line` expect an input with return carriage.

cat test
this is line

line < test
this is line
 
Old 11-10-2009, 09:37 AM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.
 
  


Closed Thread


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
slackware command line pipe-ing issue dv105v Linux - Newbie 2 11-19-2008 10:24 AM
Issue a command line statement from within a C/C++ program? DiBosco Programming 7 05-23-2008 08:34 PM
xine command line? or some other command line only engine? lumix Linux - Software 2 08-10-2007 11:46 AM
Command line/tools in CentOS/RHEL ? tuxuser19 Red Hat 5 10-01-2006 08:07 PM
Command to output file content line by line aznluvsmc Programming 2 09-12-2004 08:45 PM


All times are GMT -5. The time now is 06:11 AM.

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