![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| inline redirect stdin | ct2marer | Shell Programming and Scripting | 5 | 09-09-2008 06:50 AM |
| Redirect stdin and out to sockets | gyula | High Level Programming | 1 | 09-02-2008 07:30 AM |
| Array Printing Inline | vakharia Mahesh | Shell Programming and Scripting | 2 | 05-21-2008 09:53 AM |
| redirect STDIN | prkfriryce | Shell Programming and Scripting | 4 | 01-04-2007 07:11 AM |
| stdin not tty when try to pine or redirect | Micz | UNIX for Dummies Questions & Answers | 1 | 05-20-2004 11:58 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
inline redirect stdin
Hi:
I have the next script on ksh #!/usr/bin/ksh cd $FUENTES qdesign <<-! \$/opt/cognos/ph843e/bin/qtp <<-! \$/opt/cognos/ph843e/bin/quiz <<-! ! ! ! This script is very simple, i want to nest three process quiz into qtp, and this into qdesign. When I run it , i receive the next error. ./aa[7]: !: not found ./aa[8]: !: not found Why ?¿?¿ can i nest inline commads with input redir. Regards |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
I don't think you can, especially not with the same delimiter for them all. Perl has support for combining here documents but you still can't nest them there, only serialize.
Code:
perl -e 'print <<HERE; print <<THERE; print <<EVERYWHERE; I am the walrus HERE The walrus was Paul THERE Happiness is a warm gun EVERYWHERE print "done.\n"' What do you mean by nesting these, and how do you expect to achieve three of the "quiz" processes? Do you mean a pipeline, by any chance? Code:
quiz | qtp | qdesign Last edited by era; 09-09-2008 at 11:04 AM. Reason: Pipeline speculation |
|
#3
|
|||
|
|||
|
I also am confused, like Era, about what you are trying to achieve.
For the record, you can nest heredocs in ksh93 as shown by the following trivial example: Code:
#!/usr/bin/ksh93 TMP=file.$$ cat <<< $(echo "first time") > $TMP cat <<EOF1 >> $TMP current date: $(date) =================== $(cat <<EOF2 second time current date: $(sleep 1; date) =================== $(cat <<EOF3 third time current date: $(sleep 1; date) EOF3 ) =================== EOF2 ) EOF1 cat $TMP rm $TMP Code:
$ ./trivial first time current date: Tue Sep 9 21:48:52 EDT 2008 =================== second time current date: Tue Sep 9 21:48:53 EDT 2008 =================== third time current date: Tue Sep 9 21:48:54 EDT 2008 =================== $ |
|||
| Google The UNIX and Linux Forums |