10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Guys, I have a variable in a script that I want to transform to into something else Im hoping you guys can help. It doesn't have to use sed/awk but I figured these would be the simplest.
DATE=20160120
I'd like to transform $DATE into "01-20-16" and move it into a new variable called... (8 Replies)
Discussion started by: dendenyc
8 Replies
2. Shell Programming and Scripting
Hi All,
I want to modify(changing the status from "on" to "off" status of Stage-element value from the below xml file using sed or awk:
File Name: global.xml
<?xml version="1.0" encoding="UTF-8"?>
<config>
<widget>
<name>HTTP-POOL</name>
<attributes>
... (5 Replies)
Discussion started by: wamqemail2
5 Replies
3. Shell Programming and Scripting
trying to write up a script to put the suffix back.
heres what I have but can't get it to do anything :(
would like it to be name.date.suffix
rsync -zrlpoDtub --suffix=".`date +%Y%m%d%k%M%S`.~" --bwlimit=1024 /mymounts/test1/ /mymounts/test2/
while IFS=. read -r -u 9 -d '' name... (1 Reply)
Discussion started by: jmituzas
1 Replies
4. Shell Programming and Scripting
Ok, so I have a bash script with an embedded expect statement.
Inside of the expect statement, i'm trying to pull all of the non-comment lines from the /etc/oratab file one at a time.
Here's my command:
cat /etc/oratab |sed /^s*#/d\ | awk 'NR==1'|awk -F: '{print \"$1\"}'|. oraenv
Now,... (0 Replies)
Discussion started by: alexdglover
0 Replies
5. UNIX for Dummies Questions & Answers
Hi Guys,
Can you help me in creating shell script using sed,awk etc commands to generate csv file using xml file. (5 Replies)
Discussion started by: sbk
5 Replies
6. Shell Programming and Scripting
Hello,
I have two text files (txt1 and txt2). txt1 contains many lines with a single number in each line. txt2 (xml format) contains information about the numbers given in txt1. I need to insert one line in txt2 within the scope of each number taken from txt1.
Sample problem:
txt1:
12
23... (1 Reply)
Discussion started by: shekhar2010us
1 Replies
7. Shell Programming and Scripting
Hello everyone,
Firstly i do not require alot of help.. i am right at the end of finishing my scipt but cannot find a solution to the last part.
What i need to do is, prompt the user for a file to work with, which i have done.
promt the user for an output file - which is done.
#!/bin/bash... (14 Replies)
Discussion started by: hugh86
14 Replies
8. Shell Programming and Scripting
I am completely new to bash scripting and now need to write a bash script that would parse a XML file and take out values from specific tags.
I tried using xsltproc, xml_grep commands. But the issue is that the XML i am trying to parse is not UTF 8. so those commands are unable to parse my XML's... (4 Replies)
Discussion started by: shivashankar.g
4 Replies
9. Shell Programming and Scripting
Hi, I want to get data from Xml file by using sed or awk command. I want to get the following result :
mon titre 1;Createur1;Dossier1
mon titre 1;Createur1;Dossier1
and save it in cvs file (fichier.cvs).
FROM this Xml file (test.xml):
<playlist version="1">
<trackList>
<track>... (1 Reply)
Discussion started by: yeclota
1 Replies
10. Shell Programming and Scripting
Hi people!,
I need extract from the file (test-file.txt) the values between
<context> and </context> tag's , the total are 7 lines,but i can only get 5 or 2 lines!!:confused:
Please look my code:
#awk '/context/{flag=1} /\/context/{flag=0} !/context/{ if (flag==1) p
rint $0; }'... (3 Replies)
Discussion started by: ricgamch
3 Replies