avatar
Question about I/O redirection.# Unix - 噫吁兮,危乎高哉
x*i
1
I think most of us are familiar with < , >
but can you tell me how to use << ?
I check 2 book but can't get clear answer :(
I just want to run a command but I don't want to input from a file.
For example.
cfpost {cfpost is an application program}

the content of input.txt is the input sequence shown as follows:
1 {open some kind of file}
11 {select some kind of parameter}
4
avatar
m*e
2
there is no <<

【在 x***i 的大作中提到】
: I think most of us are familiar with < , >
: but can you tell me how to use << ?
: I check 2 book but can't get clear answer :(
: I just want to run a command but I don't want to input from a file.
: For example.
: cfpost : {cfpost is an application program}
:
: the content of input.txt is the input sequence shown as follows:
: 1 {open some kind of file}

avatar
x*i
3
The book I am reading now shows there is construct like
< , >, >| , >> , << , Maybe it is depend on different shell?
Or anyway, any method which can get input from line directory?

【在 m*****e 的大作中提到】
: there is no <<
avatar
x*i
4
There did exit <<
For example, for my question below:
You can run as :
cfpost <1
11
4
0
test
work done. Pay attention that there must be 2 test.
And test is any word you select but much appear in couple(two times)

【在 x***i 的大作中提到】
: I think most of us are familiar with < , >
: but can you tell me how to use << ?
: I check 2 book but can't get clear answer :(
: I just want to run a command but I don't want to input from a file.
: For example.
: cfpost : {cfpost is an application program}
:
: the content of input.txt is the input sequence shown as follows:
: 1 {open some kind of file}

avatar
m*e
5
that's different.

【在 x***i 的大作中提到】
: There did exit <<
: For example, for my question below:
: You can run as :
: cfpost <: 1
: 11
: 4
: 0
: test
: work done. Pay attention that there must be 2 test.

avatar
l*l
6
"<Like, if you using gnuplot to plot a pic, you usually in interact method,
but sometime you want save time or for a batch process,
you can use that:
sample.sh
#!/bin/sh
gnuplot << _EOF_ ### Note, input start here.
set xlable
set ylable
set zlable
set output '/lul/physics/DEC/pythia/work/plot/new.ps'
set terminal postscript landscape noenhanced monochrome dashed "Helvetica" 14
set size 1,1
set title ''
set key right top Right noreverse samplen

【在 x***i 的大作中提到】
: I think most of us are familiar with < , >
: but can you tell me how to use << ?
: I check 2 book but can't get clear answer :(
: I just want to run a command but I don't want to input from a file.
: For example.
: cfpost : {cfpost is an application program}
:
: the content of input.txt is the input sequence shown as follows:
: 1 {open some kind of file}

avatar
o*a
7
the same as that in perl

【在 x***i 的大作中提到】
: The book I am reading now shows there is construct like
: < , >, >| , >> , << , : Maybe it is depend on different shell?
: Or anyway, any method which can get input from line directory?

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。