It appears that you want the contents of file name to be the stdin of the program (the < redirects the stdin of program and feeds the contents of the file into it), and you also want the name of the file to be a parameter available in program.
assuming that program expects a filename as the first parameter then
should achieve what you want
how can i redirect standard input? i dont remember :/, though could you redirec not from a command? i mean, to redirect always stdin and stout (1 Reply)
I tried copy the output files from find command into a directory.
Example,
find / -name core 2>/dev/null | xargs cp????
I have known that we can use xargs to execute command lines from standard input but how to use it in this case.
Or I can do something besides xargs. (2 Replies)
Dear...
I have a scrpit that contains multiple read command.... when I run the script I have to enter 3 variables so that I can get the output..
but, I dont want to put those 3 inputs manually every time... I want to make a shell that reads the 3 inputs from a file.
the script name is... (4 Replies)
Hi All,
How do I provide the output of a command to another command which is waiting for an input from the user ?
Ex : I need to login to a device via telnet. In the script, initially I use the "read" command to get the IP Address, Username and Password of the device from the user. Now,... (1 Reply)
Hello,
I'm writting a korn script that executes a daemon in a remote server. The problem is that daemon doesn't go background until it receives an enter from the standard input, and it maintains the rsh opened until it get it. I'm looking for the best (efficient and elegant) way to do send the... (3 Replies)
Hello,
I am new to scripting.
How do I read multiple lines from the command line?
I know read reads one line, but if I have to read multiple lines, how should I do?
Thanks,
Prasanna (4 Replies)
So, I am new to shell scripting and have a few problems.
I know how to read from standard input but I do not know how to really compare it to say, a character. I am trying to compare it to a character and anything exceeding just a character, the user will get an output message, but the program... (7 Replies)
I have a program that requires the user to enter input values while it is being run
for example in bash
...
...
..
echo "Enter your input"
read input
echo $input
...
...
...I need to schedule this program with crontab, hence a problem, cronjobs run in the background, any ideas on how to... (10 Replies)
Just started learning Unix and received my first assignment recently. We haven't learned many commands and honestly, I'm stumped. I'd like to receive assistance/guidance/hints.
1. The problem statement, all variables and given/known data:
How do I write a shell script that takes in a file or... (4 Replies)
Discussion started by: fozilla
4 Replies
LEARN ABOUT DEBIAN
dar_slave
DAR_SLAVE(1) General Commands Manual DAR_SLAVE(1)NAME
dar_slave - disk archive slave for remote access to a dar archive
SYNOPSIS
dar_slave [options] [<path>/]source
dar_slave -h
dar_slave -V
DESCRIPTION
dar_slave reads an archive and listens for dar orders on standard input, sending asked parts of the archive on standard output.
Source is the basename of the archive to read. By default, dar_slave uses standard input and output to communicate with a dar process,
which may be running on the local host or on a remote host. It is possible to change the behavior of dar_slave to use named pipe instead of
standard input and output
OPTIONS -h Displays help usage.
-V Displays version information.
-i <filename> reads the orders from the named file instead of standard input. In most cases the filename will be a named pipe.
-o <filename> sends the data to the named file <filename> instead of standard output. In most cases the filename will be a named
pipe.
-E <string> string is a command to be launched between slices. See dar(1) man page (same option) for more information.
-Q Do not display any message on stderr when not launched from a terminal (for example when launched from an at job or
crontab). Remains that any question to the user will be assumed a 'no' answer, which most of the time will abort the
program.
-j when virtual memory is exhausted, as user to make room before trying to continue. By default, when memory is exhausted
dar aborts.
-; <num> Defines the minimum number of digits to use for archive slice numbers. See the same option in dar man page for more
details.
EXIT CODES
dar_slaves exists with the same codes as dar does, see dar(1) man page.
SIGNALS
Any signal sent to dar_slave will abort the program immediately, there is no way to have a proper termination before the end of the process
SEE ALSO dar(1), dar_xform(1), dar_manager(1), dar_cp(1)KNOWN BUGS
None actually.
AUTHOR
http://dar.linux.free.fr/
Denis Corbin
France
Europe
3rd Berkeley Distribution March 3rd, 2012 DAR_SLAVE(1)