10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have an XML tag like this:
<property name="agent" value="/var/tmp/root/eclipse" />
Is there way using awk that i can get the value from the above tag. So the output should be:
/var/tmp/root/eclipse
Help will be appreciated.
Regards,
Adi (6 Replies)
Discussion started by: asirohi
6 Replies
2. Shell Programming and Scripting
I have this script to parse some logs:
#!/bin/bash
id=$1
shift
sed "/(id=$id)/,/^$/!d" "$@"
Usage: ./script.sh 1234 logfile
The logs have an empty line before the logged events/timestamps -- most of the time. And this is my issue, since when there is no empty line, it will catch things... (4 Replies)
Discussion started by: KidCactus
4 Replies
3. Shell Programming and Scripting
Hi Unix gurus..
I have a file which has below data, It has several MQ Queue statistics;
QueueName= 'TEST1'
CreateDate= '2009-10-30'
CreateTime= '13.45.40'
QueueType= Predefined
QueueDefinitionType= Local
QMinDepth= 0
QMaxDepth= 0
QueueName= 'TEST2'
CreateDate= '2009-10-30'... (6 Replies)
Discussion started by: dd_psg
6 Replies
4. Shell Programming and Scripting
Hi
I am trying to figure out the best way to search a long log file and print out certain information.
For example if I had a line in a log file delimited by ampersand
first_name=mike&last_name=smith&zip_code=55555&phone=555-5555&state=ma&city=boston
and I only wanted to search for and... (3 Replies)
Discussion started by: mstefaniak
3 Replies
5. Shell Programming and Scripting
Hi folks,
I have XML files with the following sections (section occurs once per file) in them:
<AuthorList CompleteYN="Y">
<Author ValidYN="Y">
<LastName>Bernal</LastName>
<ForeName>Federico</ForeName>
... (3 Replies)
Discussion started by: euval
3 Replies
6. Shell Programming and Scripting
I am trying to parse two files and get data that does not match in one of the columns ( column 3 in my case )
Data for two files are as follows
A.txt
=====
abc 10 5 0 1 16
xyz 16 1 1 0 18
efg 30 8 0 2 40
ijk 22 2 0 1 25
B.txt
=====
abc... (6 Replies)
Discussion started by: roger67
6 Replies
7. Shell Programming and Scripting
I am just beginning with sed and awk and understand that they are "per" line input. That is, they operate on each line individually, and output based on rules, etc.
But I have multi-line text blocks that looks as follows, and wish to ONLY extract the text between the first hyphen (-) and the... (13 Replies)
Discussion started by: bulgin
13 Replies
8. Shell Programming and Scripting
Hi,
I need an awk command that would parse the below expression
Input Format
1 'Stmt1 ............................'2 'Stmt2 ............................'3 'Stmt3 ............................'4 'Stmt4 ............................'5 'Stmt5 ............................'6 'Stmt6... (1 Reply)
Discussion started by: rajan_san
1 Replies
9. Shell Programming and Scripting
Folks,
I have a textfile with the config of my router. Part of that config looks like this:
router config
...
ip access-list extended MyAccessList
remark this is my security rule
permit host 10.0.0.1 any
deny host 10.0.0.2 any
...
ip access-list extended YourAccessList
... (25 Replies)
Discussion started by: philipz
25 Replies
10. Shell Programming and Scripting
suppose if u have a file like that
Hen ABCCSGSGSGJJJJK 15
Cock ABCCSGGGSGIJJJL 15
* * * * * * : * * * . * * * :
Hen CFCDFCSDFCDERTF 30
Cock CHCDFCSDHCDEGFI 30
* . * * * * * * * : * * :* : : .
The output shud be
where there is : and .
It shud... (4 Replies)
Discussion started by: cdfd123
4 Replies