10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello
I want to collapse a file with multiple rows into consolidated lines of entries based on selected columns as the 'key'.
Example:
1 2 3 Abc def ghi
1 2 3 jkl mno p qrts
6 9 0 mno def Abc
7 8 4 Abc mno mno abc
7 8 9 mno mno abc
7 8 9 mno j k
So if columns 1, 2 and 3 are... (6 Replies)
Discussion started by: linuxlearner123
6 Replies
2. Shell Programming and Scripting
Hi I would like to move the first 1000 rows of my file into an output file and then move the last 1000 rows into another output file.
Any help would be great
Thanks (6 Replies)
Discussion started by: kylle345
6 Replies
3. Shell Programming and Scripting
Hi all,
I have a question for the Gurus. I apologize if this has bee shared before but I couldn't find the link.
I am trying to read parameters from an external parameter file. What I m trying to achieve is read selected lines from an external parameter file into the script. for eg my param... (4 Replies)
Discussion started by: maverick1947
4 Replies
4. Shell Programming and Scripting
Hi,
I have two files Input1.txt and Input2.txt and i need to have a output with selected lines starting with the values present in Input2.txt.
For example:
Input1.txt:... (5 Replies)
Discussion started by: bhas
5 Replies
5. UNIX for Dummies Questions & Answers
Greetings!
Can we automate the process of removing a newline char from selected rows in a fixed width file using a shell?
Input is like
abcd1234
xyzd1234
abcd
a1b2c3d4
abcd1234
xyzd1234
xx
abcd1234
Expected output -
abcd1234xyzd1234
abcda1b2c3d4abcd1234xyzd1234
xxabcd1234
... (2 Replies)
Discussion started by: mailme0205
2 Replies
6. Shell Programming and Scripting
Hey guys
I have got a tab-separated file and I want to copy only selected records from two columns at a time satisfying specified condition, and create a new file.
My tab separated file is like this
ID score ID score ID Score ID score ID score
1_11 0.80 2_23 0.74 2.36 0.78 2_34 0.75
A_34... (9 Replies)
Discussion started by: jacks
9 Replies
7. Shell Programming and Scripting
Hi everybody:
Could anybody tell me how I can print from a file a selected rows with awk. In my case I only want print in another file all the rows from NR=8 to NR=2459 and the increment each 8 times.
I tried to this:
awk '{for (i=8; i=2459; i+=8); NR==i}' file1 > file2
But doesn't... (6 Replies)
Discussion started by: tonet
6 Replies
8. Shell Programming and Scripting
Hi all, i am doing a perl script to read from a db. I am able to retrieve the rows, but i am unable to return the number of rows selected. i tried
$selectedrows = $sth->numrows; i got the error msg:
Can't locate object method "numrows" via package "DBI::st"
i changed it to $selectedrows =... (7 Replies)
Discussion started by: new2ss
7 Replies
9. Shell Programming and Scripting
I want to capture contents of a file between 2 strings into another file
for eg all lines in between the keywords "start log" and "end log" should be copied into another file (1 Reply)
Discussion started by: misenkiser
1 Replies
10. Shell Programming and Scripting
I have a log file from which I want to cut out the ten lines assoictiated to my search requirment (cust_ref #).
The cust_ref number will be on te first line and the update information will be on the following ten lines (which dosen't linking data to grep on).
Using a script I would like to... (4 Replies)
Discussion started by: nhatch
4 Replies