10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
In the awk below I am trying to cp and paste each matching line in f2 to $3 in f1 if $2 of f1 is in the line in f2 somewhere. There will always be a match (usually more then 1) and my actual data is much larger (several hundreds of lines) in both f1 and f2. When the line in f2 is pasted to $3 in... (4 Replies)
Discussion started by: cmccabe
4 Replies
2. Shell Programming and Scripting
Hi,
Anyone can help on how to append a file1.txt into file2.txt after line 3 using sed command.
file1.txt
1. testa
2. testb
3. testc
4. testd
5. test5
6. test6
file2.txt
break here
this is a test
break end here
output
1. testa
2. testb (1 Reply)
Discussion started by: fspalero
1 Replies
3. Shell Programming and Scripting
Hi,
I had generated a report in my tool as followsoutput.txt
43.35
9
i needed the script to generate a new file like below
i want to append the text to each of these lines of my filenewoutputfile.txt should be
Total Amount : 43.35
Record Count:9
Regards,
Vasa Saikumar.
... (2 Replies)
Discussion started by: hemanthsaikumar
2 Replies
4. UNIX for Dummies Questions & Answers
I would like to add a line to the end of a single column text file. How do I go about doing that?
Input:
BEGIN
1
2
3
Output:
BEGIN
1
2
3
END
Thanks! (1 Reply)
Discussion started by: evelibertine
1 Replies
5. UNIX for Dummies Questions & Answers
Hello,
I have 50 text files in a directory called "AllFiles"
I want to make a program that will go inside of the "AllFiles" Directory and count the number of lines in each individual text file. Then, the program will calculate how many more lines there are over 400 in each text file and... (7 Replies)
Discussion started by: motoxeryz125
7 Replies
6. Shell Programming and Scripting
Say I have a text file like:
1
3
4
How would I use ksh to put the number '2' into the second line of that file? I'm using OpenBSD so the sed syntax might be a bit different (I have no idea how to use sed, though) (4 Replies)
Discussion started by: guitarscn
4 Replies
7. Shell Programming and Scripting
I have a file containing about 5 million rows, in the file there are some records which has extra delimiter at random position. (we dont know the positions), now we have to Count the delimeter from each row and if the count of delimeter is not matching then I want to delete those rows from the... (5 Replies)
Discussion started by: Akumar1
5 Replies
8. Shell Programming and Scripting
Hello forum,
I need help with a script for displaying the number of instances/times a particular line appears in a tab-delimited file and append that number to the end of the line.
Example text file:
aaa bbb ccc ddd
ggg hhh kkk nnn
aaa bbb ccc ddd
aaa bbb ccc ddd
ppp qqq nnn sss
ggg... (1 Reply)
Discussion started by: jaysean
1 Replies
9. Shell Programming and Scripting
Hi,
I want to get a Line count of a file and append that at the end of the file. The Line count should not include the Headers :
------------------
COL1,COL2,COL3
123,abc,011
111,abd,0212
Record Count: 2
-------------------
Thanks. (7 Replies)
Discussion started by: smc3
7 Replies
10. Shell Programming and Scripting
Hi
I need to append some text @ end of the first line in a file.
like
myfile.txt
list = a,b,c
list.a=some..
I give the arg "d" . now it append at end of first line
list=a,b,c,d
list.a=some...
Please help me out this (7 Replies)
Discussion started by: catgovind
7 Replies