I'm working with a file with an xml structure. I'd like to parse it down to just the bits i want. Here is and example of the file
I'd like to take the bold bits and Put them in a list ie.
$date $body
so the output would look like this:
I have some code that will get each of these and list them sepereately but I'm having a hard time combining the two lists.
Everyway I've tried to make the list has failed so far
Thankyou for the help, I know this should be simple, yet alludes me so far.
1. Is there any special reason why we are going for non-greddy matching(.+?)
2. In the first if statement , the delimiters are not provided properly. I think its treating ">" as redirection operator .
Command 1:
$script | grep 'Write to ECC( SSID=MARGIN)'
Command 2:
$script | grep 'is not greater than existing logical processing'
The above commands run my script and search the mentioned strings but I do not want to run my script twice. It is increasing run time.
Can someone tell me... (3 Replies)
I have the following sh-script:
konsole -T todo -e vi todo.txt &
konsole -T window1 -e ssh user@server &
konsole -T window2 -e ssh user@server2 -e cd directory &
The first two lines are working fine. The first opens a txt-file, the second opens a ssh-connection.
The third line... (6 Replies)
Hey everyone,
I am working in an environment where the different users can use ksh or csh. My situation is that I need the same result with one single command line.
I am searching for the real path the file is in.
My ksh input and output
ts2:ts2adm> cd $(dirname $(which sapcontrol)); pwd -P... (2 Replies)
Thanks in advance for any advice and help.
I have two lists of variables that I want to put into nested for loops.
for x in 1 2 3
do
for y in a b c
do
The output I want is:
filepath/1/ command modified by a
filepath/2/ command modified by b
filepath/3/ command modified by c
To... (10 Replies)
Hello everyone! I currently work in the motion picture industry and we constantly receive lists of missing media from our sound department. I use a series of commands in TextWrangler in order to remake the lists into useable copy commands to automate the whole process but if I could make this work... (9 Replies)
sed -e :a -e 's/<*>//g;/</N;//ba' a2.html -removes html tags
and
sed -i 's/YOURS TRULY/Joe Bob/' a2.html
Replaces a string with another string
can i make it into one string? (2 Replies)
Hi,
i tried to combine grep with find and it didnt work
grep 'find dirname filename"
i also would like that the file will be sorted in the way.
thanks a lot. (2 Replies)