9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a large XML file that I want to parse, and only print one specific value if two values are met.
This is the code so far:
#!/usr/local/bin/python
import xml.etree.ElementTree as ET
tree = ET.parse('onedb-dhcp.xml')
root = tree.getroot()
# This successfully gets all... (1 Reply)
Discussion started by: brianjb
1 Replies
2. Shell Programming and Scripting
suppose i have original file:
original.txt:
hello
how are you
you are wonderful
what time is it
I went to the store last night. and some apple juice
then i have another file:
anotherfile.txt:
with my friends mary, john and harry.
We had a great time.
We bought food
Suppose... (1 Reply)
Discussion started by: SkySmart
1 Replies
3. Shell Programming and Scripting
Hi all,
I'm new to scripting.. facing some problems while inserting content of a file into another file...
I want to insert content of a file (file2) into file1, before first occurrence of "line starts with pattern" in file1
file1
======
working on linux
its unix world
working on... (14 Replies)
Discussion started by: Jagadeesh Kumar
14 Replies
4. Shell Programming and Scripting
In the file below I am trying to extract a specific instance of path, if the adjacent plugin": "/rundb/api/v1/plugin/49/. Thank you :).
file
"path": "/results/analysis/output/Home/Auto_user_S5-00580-4-Medexome_65_028/plugin_out/FileExporter_out.52", "plugin": "/rundb/api/v1/plugin/49/",... (8 Replies)
Discussion started by: cmccabe
8 Replies
5. Shell Programming and Scripting
Hi friends, here is my problem.
I have three files like this..
cat file1.txt
=======
unix is best
unix is best
linux is best
unix is best
linux is best
linux is best
unix is best
unix is best
cat file2.txt
========
Windows performs better
Mac OS performs better
Windows... (4 Replies)
Discussion started by: Jagadeesh Kumar
4 Replies
6. Shell Programming and Scripting
I need to insert file x2 into x1 right before first BBB line.
$ cat x1
AAA 1
AAA 2
AAA 3
BBB 1
BBB 2
BBB 3
$ cat x2
XXX - insert 1
XXX - insert 2
I need to get
AAA 1
AAA 2
AAA 3
XXX - insert 1
XXX - insert 2
BBB 1 (2 Replies)
Discussion started by: migurus
2 Replies
7. Shell Programming and Scripting
Hi,
I look for a awk one liner for below issue.
input file
ABC 1234 abc 12345
ABC 4567 678 XYZ
xyz ght 678
ABC 787 yyuu
ABC 789 7890 777
zxr hyip hyu
mno uii 678 776
ABC ty7 888
All lines should be started with ABC as first field. If a record has another value for 1st... (7 Replies)
Discussion started by: ratheesh2011
7 Replies
8. Shell Programming and Scripting
Hi, it's my first post to this forum. I just started bash and I'm stuck at one issue. I want to include content of a file in another file after a certain line. I'm using sed for inserting one line but how to insert all content of a file ?
For example i have a file list.txt with a few lines and... (4 Replies)
Discussion started by: ktm
4 Replies
9. Shell Programming and Scripting
please help for the following task...
I have to extract the mac address & IP address from the file1:
...
0100004512EEF4 03 192.168.0.7 192.168.0.1 -1 ...
0100779hF5D212 03 192.168.0.8 192.168.0.1 -1 ...
0100789lF5D212 03 192.168.0.9 192.168.0.1 -1 ...
...
change the format (addidng... (15 Replies)
Discussion started by: fredao
15 Replies