12-04-2004
If you write a script, you can send input into it like this:
./somescript < inputfile
The script can accomplish the same thing internally by using:
exec < inputfile
After that line, the script's input is inputfile. It can do the same to output:
exec > somescript.log 2>&1
This send stderr and stdout combined into the file. There is more to it, but this is the basics.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
linux redhat 8.0
I am getting accustomed to using the -exec command to get around my databse.. and use it to edit and update files..! is this more apllicable than jumping from one directory to the other.. I have set up the databse so that the inode #'s are accessable and can get me from one... (0 Replies)
Discussion started by: moxxx68
0 Replies
2. Shell Programming and Scripting
im having trouble with the comprehending the exec command and the use of file descriptors.
given:
#!/bin/sh
exec 4>&1
exec 1>&2
exec 2>&4
exec 4>&-
echo Hello
would the standard output of this script be sent to STDOUT, STDERR or neither and why???
thanks for the help. (1 Reply)
Discussion started by: rfourn
1 Replies
3. Shell Programming and Scripting
Need to close files which descriptor number are larger than 9 in ksh.
'exec 10>&-' fails with 'ksh: 10: not found'. How do you specify file descriptors which occupies two or more digits in ksh script?
Thanks,
Masaki (2 Replies)
Discussion started by: masaki
2 Replies
4. Shell Programming and Scripting
can any one pls explain the meaning of
exec 1<&5 ?? its urgent (2 Replies)
Discussion started by: santosh1234
2 Replies
5. HP-UX
Hi,
I speak and write english more or less, so I hope my asking be clear.
:)
In the company I am working, they are using control-m software to lunch
shell scripts.
So i put this command in all shell scripts:
export LOGFILE_tmp=$PRODUC_DATA/tmp/${SCRIPT}_${PAIS}_`date... (0 Replies)
Discussion started by: anamcara
0 Replies
6. UNIX for Dummies Questions & Answers
Hi can some one explain the following command , It would really help if some can really elloborate on what is happening out here
export PATH | exec /bin/sh ./auto_approve :q
P.S: This is the first time i am using exec ,so an elloboration what does it do and what is the use of the :q will be... (1 Reply)
Discussion started by: Sri3001
1 Replies
7. Shell Programming and Scripting
Hi,
I have the following lines in a script :
.
.
exec < some_file
.
.
.
I have very little idea about exec command. I would like to know what this does and what will happen if the file some_file does not exist. Specifically, I would like to know whether the lines following this... (5 Replies)
Discussion started by: elixir_sinari
5 Replies
8. Shell Programming and Scripting
Hi,
I want to execute some commands via ssh.
errupdate <enter>
=5A7598C3: <enter>
Report=False <enter>
Log=False <enter>
<CTRL + D>
<CTRL + D>
how can i do this ? I suppose i have to use file descriptor but i don't know how ?
Thank you (2 Replies)
Discussion started by: khalidou13
2 Replies
9. Shell Programming and Scripting
Hello,
I have a text file in the below format:
Source Destination State Lag Status
CQA02W2K12pl:D:\CAQA ... (10 Replies)
Discussion started by: pocodot
10 Replies
10. Shell Programming and Scripting
Hello.
From a script, a command for a test is use :
find /home/user_install -maxdepth 1 -type f -newer /tmp/000_skel_file_deb ! -newer /tmp/000_skel_file_end -name '.bashrc' -o -name '.profile' -o -name '.gtkrc-2.0' -o -name '.i18n' -o -name '.inputrc'
Tha command... (3 Replies)
Discussion started by: jcdole
3 Replies
frog(1) General Commands Manual frog(1)
NAME
frog - Dutch morpho-syntactic analyzer, IOB chunker and dependency parser
SYNOPSYS
frog [options]
frog -t test-file
DESCRIPTION
frog is an integration of memory-based natural language processing (NLP) modules developed for Dutch. frog's current version will tok-
enize, tag, lemmatize, and morphologically segment word tokens in Dutch text files, add IOB chunks and will assign a dependency graph to
each sentence.
OPTIONS
-c <configfile>
set the configuration using 'file'
-d <level>
set debug level.
-e <encoding>
set input encoding. (default UTF8)
-h
give some help
--keep-parser-files=[yes|no]
keep the intermediate files from the parser. Last sentence only!
-n
assume inputfile to hold one sentence per line
-o <file>
send output to 'file' instead of stdout. Defaults to the name of the inputfile with '.out' appended.
--outputdir <dir>
send all output to 'dir' instead of stdout. Creates filenames from the inputfilename(s) with '.out' appended.
--skip=[mptc]
skip parts of the proces: Tokenizer (t), Chunker (c), Multi-Word unit (m) or Parser (p)
-Q
Enable quotedetection in the tokenizer. May run havock!
-S <port>
Run a server on 'port'
-t <file>
process 'file'
-x <xmlfile>
process 'xmlfile', which is supposed to be in FoLiA format! If 'xmlfile' is empty, and --testdir=<dir> is provided, all files in
'dir' will be processed as FoLia XML.
--testdir=<dir>
process all files in 'dir'. see also --outputdir
--tmpdir=<dir>
location to store intermediate files. Default /tmp.
-V or --version
show version info
--xmldir=<dir>
generate FoLiA XML output and send it to 'dir'. Creates filenames from the inputfilename with '.xml' appended.
-X <file>
generate FoLiA XML output and send it to 'file'. Defaults to the name of the inputfile(s) with '.xml' appended.
--id=<id>
When -X for FoLia is given, use 'id' to give the doc an ID.
BUGS
likely
AUTHORS
Maarten van Gompel proycon@anaproy.nl
Ko van der Sloot Timbl@uvt.nl
Antal van den Bosch Timbl@uvt.nl
SEE ALSO
ucto(1)
2012 January 31 frog(1)