I wonder if any body can help me with a command i am struggling with. I have a file with around 400 lines in, in a program i have it pulls out each line at a time so that data from the line can be cross referenced with another file. If it finds a match it pulls out a ocde from the second file, this... (5 Replies)
Hi Unix gurus
I have a file containing 2 coloumns. I would like to do a script which reads the lines and executes a command like this:
command <field1> parameters <field2> some more parameters
Please let me know how you would do this without AWK, SED or any other mini language (for special... (5 Replies)
Hi all,
I would like to extract the line number of the n-th occurrency of a given string in a file.
e.g.
xxx
yyy
xxx
zzz
xxx
the second occurrency of xxx is at line 3.
What is the fastest way to do it in bash?
Thank you, (8 Replies)
Hi
I have requirement to find nth occurrence in a file and capture data from with in lines (between lines)
Data in File.
<QUOTE>
<SESSION>
<ATTRIBUTE NAME='Parameter Filename' VALUE='file1.parm'/>
<ATTRIBUTE NAME='Service Name' VALUE='None'/>
</SESSION>
<SESSION>
<ATTRIBUTE... (6 Replies)
I have an awk script to find the maximum value of the 2nd column of a 2 column datafile, but I need to find the top 5 maximum values of the 2nd column.
Here is the script that works for the maximum value.
awk 'BEGIN { subjectmax=$1 ; max=0} $2 >= max {subjectmax=$1 ; max=$2} END {print... (3 Replies)
Is there an awk script that can easily perform the following operation?
I have a data file that is in the format of
1944-12,5.6
1945-01,9.8
1945-02,6.7
1945-03,9.3
1945-04,5.9
1945-05,0.7
1945-06,0.0
1945-07,0.0
1945-08,0.0
1945-09,0.0
1945-10,0.2
1945-11,10.5
1945-12,22.3... (3 Replies)
Hi,
When I use the paste command in the terminal window it works fine, but when i try to use it in a bash script file i get errors. I'm not sure how to use the paste command in a bash script file.
my paste command looks like this
paste <( code1 ) <(code2)
thanks (7 Replies)
Hi everybody
I am trying to merge many files in one files using paste or pr command but I am not able to resolve this issue.
The file are tab delimited like these:
1 4721519 4723118
1 5022468 5024918
1 7093519 7098118
2 19736573 19741172
2 21907973 21910572... (4 Replies)
Discussion started by: giuliangiuseppe
4 Replies
LEARN ABOUT REDHAT
paste
PASTE(1) FSF PASTE(1)NAME
paste - merge lines of files
SYNOPSIS
paste [OPTION]... [FILE]...
DESCRIPTION
Write lines consisting of the sequentially corresponding lines from each FILE, separated by TABs, to standard output. With no FILE, or
when FILE is -, read standard input.
Mandatory arguments to long options are mandatory for short options too.
-d, --delimiters=LIST
reuse characters from LIST instead of TABs
-s, --serial
paste one file at a time instead of in parallel
--help display this help and exit
--version
output version information and exit
AUTHOR
Written by David M. Ihnat and David MacKenzie.
REPORTING BUGS
Report bugs to <bug-coreutils@gnu.org>.
COPYRIGHT
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICU-
LAR PURPOSE.
SEE ALSO
The full documentation for paste is maintained as a Texinfo manual. If the info and paste programs are properly installed at your site,
the command
info paste
should give you access to the complete manual.
paste (coreutils) 4.5.3 February 2003 PASTE(1)