10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Having a little trouble getting this to work just right.
I have xml files that i want to split some data.
I have 2 <name> tags within the file
I would like to take only the first tag and split the data.
tag example.
From this.
TAB<Name>smith, john</Name>
to
TAB<Name>smith,... (8 Replies)
Discussion started by: whegra
8 Replies
2. Shell Programming and Scripting
i'm using the following code to add the entire content of a file (/tmp/resources.txt) to the line directly below the line containing a pattern (wonderful) in the file mainfile.txt:
sed '/^wonderful/ r /tmp/resources.txt' mainfile.txt
the problem is, it adds the entire content of... (1 Reply)
Discussion started by: SkySmart
1 Replies
3. Shell Programming and Scripting
Hi all,
I have a file that looks like this-
-----------------------------
.
.
ATOM 8 O2' U A 5 135.452 109.687 7.148 1.00 48.99 A16S
ATOM 9 C1' U A 5 135.282 111.512 5.641 1.00 48.99 A16S
ATOM 10 N1 U A 5 134.647 112.595 ... (2 Replies)
Discussion started by: asmi_g
2 Replies
4. Shell Programming and Scripting
Dear ALL,
I have sample file :
IDcentos-forum,bash,linuxCentOS,GNome
IEfedora-milis,cli,linuxRedhat,KDE
IRfreebsd-milis,aix,unixbsd,pyton
required output:
centos,bash,linuxCentOS,GNome
fedora,cli,linuxRedhat,KDE
freebsd,aix,unixbsd,pyton
Can you help me pls.. (1 Reply)
Discussion started by: gnulyn
1 Replies
5. Shell Programming and Scripting
Hi!
Considering below text, how would I use sed to insert text right below the v0005-line, using the SEPARATOR-line as a pattern to search for, so two lines above the separator? I can do it right above the separator, but not 2 lines...
# v0004 - Some text
# v0005 - More text
#... (5 Replies)
Discussion started by: indo1144
5 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I've got two files to match. File one:
a1 b c d e
a2 b c d e
a3 b c d e
a4 b c d e
and file 2
a1 1 2 3 4
a2 5 6 7 8
a3 9 10 11 12
a4 1 2 3 4
I need to match them by the first column and add the four columns of file 2 to the file 1 so that those added columns go as columns... (5 Replies)
Discussion started by: zajtat
5 Replies
7. Shell Programming and Scripting
Hi,
I have a text file with one line having few words separated by space and I need to insert another word on "n"th column/field so that previous word should shift right (to n+1st column). how can I do that?
It seems we can do using awk but unable to figure out.
Please advise, thanks!
... (11 Replies)
Discussion started by: magnus29
11 Replies
8. Shell Programming and Scripting
I have a sorted list (python) and I want to insert a string if it matches the pattern in list.
Example :
Sorted List
Above list is in sorted order. I need to insert a name in sorted order and also if the name already exist then it should be inserted before the existing... (1 Reply)
Discussion started by: pratapsingh
1 Replies
9. Shell Programming and Scripting
Hello,
I'm new in Shell scripting but i should write a script, which inserts the license header out of a txt-File into the files in our Projekt. For the Java classes it runs without Problems but for XML files not. At xml-files i have to put the license Header after the xml-Header (?xml... (1 Reply)
Discussion started by: PhoenixONE
1 Replies
10. Shell Programming and Scripting
can someone tell me how can I insert a word in front of each line in a file.
i tried with sed but didn't managed yet.
Is there another command or this one(sed) works?
10x anyway. (7 Replies)
Discussion started by: atticus
7 Replies