LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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


Reply
  Search this Thread
Old 02-03-2015, 11:42 PM   #1
murali2489
LQ Newbie
 
Registered: Jan 2015
Posts: 14

Rep: Reputation: Disabled
Post why cat command is used while logging into ISQL


Hi Team,
Please advise why cat command is used in the below statement to login to ISQL

Code:
cat <<exit | $SQL_DIR_ISQL/isql $DS_NAME $DB_ID $DB_PSSWD
Instead we can simply give like below right..?

Code:
 $SQL_DIR_ISQL/isql $DS_NAME $DB_ID $DB_PSSWD
Please advise... I am using kshell
 
Old 02-04-2015, 04:33 AM   #2
murali2489
LQ Newbie
 
Registered: Jan 2015
Posts: 14

Original Poster
Rep: Reputation: Disabled
Unhappy

Someone please throw some light on it ....
 
Old 02-04-2015, 07:49 AM   #3
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,491

Rep: Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429
you missed some points:
at first, this is not the whole script, just a single line, but that is not enough there should be several additional lines.
second, isql is waiting for something on stdin (that is the function of pipe), in your second example it is completely missing.
about <<exit, it is the so called here document: http://www.tldp.org/LDP/abs/html/here-docs.html
so there should be another line containing the word exit only...
 
  


Reply

Tags
cat


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
Help using cat command. stevenjeffries Linux - Newbie 2 09-29-2014 06:19 PM
cat command -s , -n doug skillmore Linux - Newbie 2 02-27-2013 05:52 PM
Firebird isql command and GLIBCPP_3.2 Brekko Linux - General 2 10-30-2005 09:52 PM
cat command juanb Linux - Newbie 4 08-19-2004 12:14 PM
cat Command Moeses Linux - General 1 06-20-2002 04:27 AM


All times are GMT -5. The time now is 12:30 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