10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I have a file with few lines starting with a digit (1-5 only ) followed by a dot (.). Remaining all the lines to be merged with its previous numbered lines. Merging must be done with a space.
E.g.,
Source file:
3. abc def
xyz
5. pqr mno
def
4. jkl uvw
7. ghi
1. abc xyz
6. mno... (4 Replies)
Discussion started by: magnus29
4 Replies
2. Shell Programming and Scripting
Hi I need to merge 4 files. The issue i am facing is all the files have headers and i do not want them in the final output file. Can anybody suggest how to do it? (5 Replies)
Discussion started by: Arun Mishra
5 Replies
3. Shell Programming and Scripting
Dear All, I have two file like this:
file1:
a1234
b1235
c4678
d7859
file2 :
e4575
f7869
g7689
h9687
I want output like this:
a1234
b1235
c4678 (2 Replies)
Discussion started by: attila
2 Replies
4. UNIX for Dummies Questions & Answers
Hello,
Firstly I just wanted to say that I'm not a programmer at all and appreciate any help you can give. I am trying to create a shellscript that reformats the file and adding up colums 5 and 6 for those sections that are continuation of the previous line(s) (signified by beginning with '*')... (4 Replies)
Discussion started by: neilh1703
4 Replies
5. Shell Programming and Scripting
hello,
I have a file which has the following structure:
word <TAB> frequency
The same word can have multiple frequencies:
John <TAB> 60
John <TAB> 20
John <TAB> 30
Mary <TAB> 1000
Mary <TAB> 800
Mary <TAB> 20
What I need is a script which could merge all these frequencies into one single... (10 Replies)
Discussion started by: gimley
10 Replies
6. Shell Programming and Scripting
Hi All:
I have following files:
File 1:
<header>
text...
text ..
text ..
text ..
<\header>
x
y
z
...
File 2:
<header>
text...
text ..
text .. (4 Replies)
Discussion started by: mrn006
4 Replies
7. Shell Programming and Scripting
Hi,
I want to merge the lines starting with a comma symbol with the previous line of the file.
Input :
cat file.txt
name1,name2
,name3,name4
emp1,emp2,emp3
,emp4
,emp5
user1,user2
,user3
Output
name1,name2,name3,name4
emp1,emp2,emp3,emp4,emp5 (9 Replies)
Discussion started by: mohan_tuty
9 Replies
8. UNIX for Dummies Questions & Answers
Hi All,
I want to merge two lines in a file till the end of the file. So what could be the command to get so.
say file name : sample.txt
contents:
country=1
send apps =1 rece=2
country=2
send apps =3 rece=3
..
...
output:
country=1;send apps =1 rece=2
country=2;send apps =3... (6 Replies)
Discussion started by: thaduka
6 Replies
9. Shell Programming and Scripting
Hello
Please help me to write Shell script.
I want to merge 2 data files . The data files have common columns
The data file A have 3 columns
Host Version Numberof Failuers
The data file B have also 3 coulmns
Host Version NumberofFailuers .
I want to merge A and B file... (2 Replies)
Discussion started by: getdpg
2 Replies
10. Shell Programming and Scripting
actually, it seems somewhat confusing.. let me clearify it
i want a file having all the attributes produced by ls -lc command. i want to add one more thing i.e. time of last access to a file attribute. so how can i merge these two things in a single file in a columnar way.
i tried with these... (2 Replies)
Discussion started by: raku05
2 Replies