05-04-2012
What does echo filename do? It prints the string 'filename'.
What does cat filename do? It reads from the file named filename.
So the 'echo' just prints the path to the pipe it ought to be reading from. cat actually reads from the pipe, and shows the output of the program.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
hi,
what i want to do is to convert all the txt file under my directory to the properties file using the native2ascii command.
however, when i run my script, i got bad substitution error. what's wrong with my script ? pls help. thanks
#!/bin/sh
curDIR=`pwd`
oldExt='txt'... (10 Replies)
Discussion started by: champion
10 Replies
2. Shell Programming and Scripting
When I run the script I pass in 2 expressions (ex. replace.ksh new old)
I want the script to go line by line for a given file in a given directory and replace the word new with old. Of course in my line where I have the awk statement it is replacing the 2nd word with 1st instead of new with... (3 Replies)
Discussion started by: goodrics
3 Replies
3. Shell Programming and Scripting
Hi,
What is the actual difference between these two? Why the following code works for process substitution and fails for command substitution?
while IFS= read -r line; do echo $line; done < <(cat file)executes successfully and display the contents of the file
But,
while IFS='\n' read -r... (3 Replies)
Discussion started by: royalibrahim
3 Replies
4. Shell Programming and Scripting
Hey, I was trying to figure out how to launch a program from the command line, and it works if you pass it a config file. I was thinking about writing a script to dynamically create the config file and pass it to the command using something like command substitution (so I don't actually have to... (3 Replies)
Discussion started by: bj0
3 Replies
5. Shell Programming and Scripting
Just playing around with process substitution.
Hoping maybe someone can give me some help on what I'm doing wrong.
When this script is run, "Null message body; hope that's ok" is returned and the script hangs.
I can't seem to work out what I'm doing wrong.
Here is the script:
#!/bin/bash... (3 Replies)
Discussion started by: mandelbrot333
3 Replies
6. Shell Programming and Scripting
Hi
I am trying to modify the file using "sed" editor and the command fails due to the fact that the variable I use contains "/" (slashes). Here is the example:
v=1
back_dir="/ts/data"
$ sed "s/\/t${v}\/data/${back_dir}/" /tmp/f323odb.lrl.alt
sed: command garbled: s/\/t1\/data//ts/data/
... (2 Replies)
Discussion started by: aoussenko
2 Replies
7. UNIX for Dummies Questions & Answers
Hey guys,
So i did some research on the site but previous posts answered most of my questions about zombie processes but I have one question that didnt seem to get addressed
"how do you find the parent or parent ID of a zombie process so you can kill it?"
I know p -kill doesnt always just... (6 Replies)
Discussion started by: kingpin007
6 Replies
8. AIX
Hi
I've been trying to learn a bit more about AIOServer processes and how my company administers them, one question i have is, while checking, most of my servers show a memory overhead of about 448 k per aioserver process (nmon -A) however i have found a few with figures of 67 or 56k. Most... (0 Replies)
Discussion started by: philib
0 Replies
9. Shell Programming and Scripting
Hi,
I've came across an issue with a script I've been writing to check DHCP addresses on an Solaris system, the script has been running reasonably well, until it hit the following problem:
./sub_mon_v2: redirection error: cannot duplicate fd: Too many open files
./sub_mon_v2: cannot make... (3 Replies)
Discussion started by: CiCa
3 Replies
10. Shell Programming and Scripting
i have tried process substitution, but run in some problems.
this works:
samtools view -h $SAMdir/$b.bam | htseq-count -m union -s no -q -t exon -i gene_id - $gtf > $b.count &
but this not:
htseq-count -m union -s no -q -t exon -i gene_id <(samtools view -h $SAMdir/$b.bam) $gtf >... (7 Replies)
Discussion started by: dietmar13
7 Replies
LEARN ABOUT SUSE
dar_slave
DAR_SLAVE(1) General Commands Manual DAR_SLAVE(1)
NAME
dar_slave - disk archive slave
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 informations.
-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.
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 JAN 8, 2006 DAR_SLAVE(1)