10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I'm trying to reformat some badly formatted XML that I've extracted from Oracle clob columns using the following nawk command:
nawk '{gsub(/</,/>\n/); print}' test.raw > test.xml
the substitution executes fine, but instead of subbing < with > followed by newline, it subs the < with a... (3 Replies)
Discussion started by: sffuji
3 Replies
2. Shell Programming and Scripting
Hi everyone,
I need very simple sed command to change a parameter in a text file.
I have a line in this text which is like
set xx 0.5
A program reads this file and does some algebraic calculations. So to make a parameter scan I need to change the value of xx. I thought I can do... (7 Replies)
Discussion started by: hayreter
7 Replies
3. Shell Programming and Scripting
Hi All,
I am using the below script which has awk command, but it is not returing the expected result. can some pls help me to correct the command.
The below script sample.ksh should give the result if the value of last 4 digits in the variable NM matches with the variable value DAT. The... (7 Replies)
Discussion started by: G.K.K
7 Replies
4. Shell Programming and Scripting
Hello everyone ...
I'm going crazy, I hope some of you can help me ...
I have to replace a line in a crontab like this:
5 2 * * 2 root backupdat
with this:
5 5 * * 3 root backupdat
the command I use is the following:
sed -i.bak -e 's/5 2 * * 2 root backupdat/5 5 * * 3 root... (4 Replies)
Discussion started by: ionral
4 Replies
5. Shell Programming and Scripting
Hi ,
I have have file which has following structure
01aaaa88888000-9999
01ssss77777000-0991
01ssss7777700000991
02ssss7777700000991
The record 01 is corrupt as value from 12th field to 19th should be positive or start with - however it is 000-9999 it should be -0009999
i need to... (4 Replies)
Discussion started by: test_user
4 Replies
6. Shell Programming and Scripting
1) ABC::2197.12:2197.12:120217144365::+DEF:INT:1:N::::6:550.00:0.00:2009-04-29:CN:4547425069636596::6:N:mrs charles:N:PH:00010031:0001'
OUTPUT - ABC::2197.12:2197.12:120217144365::+DEF:INT:1:N::::6:550.00:0.00:2009-04-29:CN:4547******636596::6:N:mrs charles:N:PH:00010031:0001'
The... (5 Replies)
Discussion started by: mad_man12
5 Replies
7. Shell Programming and Scripting
Hi ,
I am stuck up in the below scenario:-
I need to read a file name (eg A.txt) name frm another file (eg B.txt) and then I need to search for a particular expression in A.txt and substitute it with another expression.
How can I use SED inside SHELL Scripting and command prompt as well to... (1 Reply)
Discussion started by: shubhranshu
1 Replies
8. Shell Programming and Scripting
Hi ,
I am stuck up in the below scenario:-
I need to read a file name (eg A.txt) name frm another file (eg B.txt) and then I need to search for a particular expression in A.txt and substitute it with another expression.
How can I use SED inside SHELL Scripting and command prompt as... (2 Replies)
Discussion started by: shubhranshu
2 Replies
9. Solaris
#!/bin/ksh
VAR_ONE=HELLO
TEMP=ONE
echo $VAR_${TEMP}
## Output is: ONE
Hi, I want the output to echo HELLO and not ONE as the above script does. I know I am missing something with dollar substitution. Can anyone help me out ?
Thanks.
Cal (4 Replies)
Discussion started by: calredd
4 Replies
10. UNIX for Dummies Questions & Answers
I know we can substitute a string using sed but how?
For example: sed 's/(old variable)/(new variable)/ details.dat
Am I suppose to put $old variable or whatever? Because I tried many times, it didnt work by putting $old variable. Am I suppose to enclose it with "" or ''?
Please help (3 Replies)
Discussion started by: Ohji
3 Replies