07-23-2010
One output into multiple different files
Hello,
How can I redirect the output from an application into multiple different files, depending on the contents? Something like multiple greps putted into if-then-else clause... but all of this in close to real-time (not afterwards) .
Thank you very much,
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a script in which some outputs are directed to one file
echo "Load Started" >>${LOGFILE1}
If I have another file LOGFILE2 and i want to redirect the output of the above echo command to LOGFILE2 as well with the same command line... how can i do that?
Thanks (2 Replies)
Discussion started by: cobroraj
2 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I'd like to process multiple files. For example:
file1.txt
file2.txt
file3.txt
Each file contains several lines of data. I want to extract a piece of data and output it to a new file.
file1.txt ----> newfile1.txt
file2.txt ----> newfile2.txt
file3.txt ----> newfile3.txt
Here is... (3 Replies)
Discussion started by: Liverpaul09
3 Replies
3. Shell Programming and Scripting
I'm trying to use following syntax to get output in multipe lines. but its not working..
df -h | awk '{print $1}' > tee -a nss1 nss2 nss3
can any1 please tell me how can i get required output in multiple files.
I also tried this syntax but in that way i get output only in nss2 file.
... (4 Replies)
Discussion started by: kashif.live
4 Replies
4. Shell Programming and Scripting
Hi!
I'm new in awk and I need some help.
I have a folder with a lot of files and I need that awk do something in each file and print a new file with the output. The input file name should be modified when I print the outpu files.
Thanks in advance for help!
:-)
ciao (5 Replies)
Discussion started by: gabrysfe
5 Replies
5. Shell Programming and Scripting
Dear All,
I am trying to write a Unix Script which fires a sql query. The output of the sql query gives multiple rows. Each row should be saved in a separate Unix File.
The number of rows of sql output can be variable. I am able save all the rows in one file but in separate files.
Any... (14 Replies)
Discussion started by: Rahul_Bhasin
14 Replies
6. Shell Programming and Scripting
Hi,
I have many test*.ft1 files to which I want to read as input for a script called
pipe2txt.tcl and print the output in each separate file.
For example,
pipe2txt.tcl < test001.ft1 > test001.txt
How can I read many files in this maner?
thank you very much,
Best,
Pahuja (5 Replies)
Discussion started by: Pahuja
5 Replies
7. Shell Programming and Scripting
Hi All,
I want to use egrep on multiple files and the results should be output to multiple files. I am using the below code in my shell script(working in Ksh shell). However with this code I am not attaining the desired results.
#!/bin/ksh
(
a="/path/file1"
b="path/file2"
for file in... (4 Replies)
Discussion started by: am24
4 Replies
8. Shell Programming and Scripting
while IFS= read -r line
do
# sV for version detection
nmap -T4 -Pn -v -sS "$line" > "text/$line"
done < <(grep '' $file)
Hi,
where line represents the IP.
I am using NMAP to do scanning.
How can I set to execute that command in the loop several concurrently at a time instead of one... (5 Replies)
Discussion started by: alvinoo
5 Replies
9. Shell Programming and Scripting
Hey guys,
I have wrote the following script to apply a module named "trinity" on my files. (it takes two input files and spit a trinity.fasta as output)
#!/bin/bash -l
#SBATCH -p node
#SBATCH -A <projectID>
#SBATCH -n 16
#SBATCH -t 7-00:00:00
#SBATCH --mem=128GB
#SBATCH --mail-type=ALL... (1 Reply)
Discussion started by: @man
1 Replies
10. Shell Programming and Scripting
How to execute multiple files in multiple folders and also output to be generated in the same folder?
Hello Team,
I have a path like Sanity_test/*/* and it has around 100+ folders inside with files. I would like to run/execute those files and output of execution to be placed on same /... (1 Reply)
Discussion started by: pushpabuzz
1 Replies
LEARN ABOUT DEBIAN
rancid_par
rancid_par(1) General Commands Manual rancid_par(1)
NAME
rancid_par - parallel command processing
SYNOPSIS
rancid_par [-dfiqx] [-c command] [-l logfile] [-n #] file [file...]
DESCRIPTION
rancid_par takes a list of files to run a command on. The first line of each file begins with a colon (:) or a pound-sign (#). If a
colon, the remainder of the line is a command to run for each of the subsequent lines. If a pound-sign, then each subsequent line is a
(self-contained) command, unless the -c option was specified, in which case it operates as if the argument to -c had followed a colon on
the first line.
In each of the cases where the lines of the file following the first are not commands (i.e.: colon or -c), instances of open-close braces
({}) in the command will be replaced by these values.
For example, a inputfile whose contents is:
: echo {}
a
b
c
run with rancid_par like so:
%rancid_par -q inputfile
will produce the following output (order will vary):
b
a
c
The command-line options are as follows:
-c Command to be run on each of the arguments following the command-line options, where the first line of the input file(s) begins with
a pound-sign (#).
-d Print debugging information on standard error (stderr).
-f No file or STDIN, just run a quantity of the command specified with -c.
-i Run commands interactively through (multiple) xterm(1) processes.
-l Prefix of logfile name, as in prefix.N where N is the rancid_par process number ([0..]).
Default: par.log.<time>.[0..]
-n Number of simultaneous processes.
Default: 3
-q Quiet mode. Do not log anything. -q is mutually exclusive with the -x and -l options and the option appearing last will take
precedence.
-x View rancid_par logs in real-time via an xterm(1).
FILES
par.log.T.N Log file; where T is the current time in seconds since the
epoch and N is the rancid_par process number ([0..]).
18 December 2007 rancid_par(1)