10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Can anyone help me with sed or awk to do a bulk replace of the below requirements.
"REC_ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (
START WITH +7486
INCREMENT BY +1
MINVALUE +7467
MAXVALUE... (6 Replies)
Discussion started by: ilugopal
6 Replies
2. Shell Programming and Scripting
Dear All,
assume i have a file with content:
<Start>6000</Start>
<Stop>7599</Stop>
the output is:
6000
7000
7100
7200
7300
7400
7599
how should we use any awk, sed, perl can do this task, means to extract the uniq prefixes from the start and stop prefix.
Thanks
Jimmy (3 Replies)
Discussion started by: jimmy_y
3 Replies
3. Shell Programming and Scripting
Hi Team,
I am facing a problem as under, Suppose I have a file (test.txt) with the below content (all braces and slashes are included in the contents of the file)
Now I want to append few words below matched line, I have written the below sed:
sed '/option/a insert text here' test... (2 Replies)
Discussion started by: ankur328
2 Replies
4. Shell Programming and Scripting
Hi
I want to find a line in a file which contains a word and replace the patterns.
Sample file content temp.xml
====================
<applications>
<application>
Name="FirstService"
location="http://my.website.selected/myfirstService/V1.0/myfirst.war"
... (1 Reply)
Discussion started by: sakthi.99it
1 Replies
5. Shell Programming and Scripting
Script for if characters from positions 7-15 are matching with characters from position 211-219 then replace all char from 211-219 with 9 space.
Total length of record is 420. Here is the specification of the data in file.
Position Field Data Type... (2 Replies)
Discussion started by: lancesunny
2 Replies
6. Shell Programming and Scripting
My example file is as given below:
conn=1 uid=oracle
conn=2 uid=db2
conn=3 uid=oracle
conn=4 uid=hash
conn=5 uid=skher
conn=6 uid=oracle
conn=7 uid=mpalkar
conn=8 uid=anarke
conn=9 uid=oracle
conn=1 op=-1 msgId=-1 - fd=104 slot=104 LDAPS connection from 10.10.5.6 to 10.18.6.5
conn=2... (4 Replies)
Discussion started by: sags007_99
4 Replies
7. Shell Programming and Scripting
Hi, I'm new about shell scripting, and I need to do something like
abcd **1234** efgh
by
abcd '''1234''' efgh
I know that command sed helps about change one string by another, but I dont know how to keep whatever is inside **_** and replace * with '.
Thanks! (5 Replies)
Discussion started by: selvaya
5 Replies
8. Shell Programming and Scripting
Hi Everyone,
#!/usr/bin/perl
use strict;
use warnings;
my %prefix_to_rate = (
'93' => "1.50",
'6iii' => "0.22"
);
my ( $shortest, $longest ) =
( sort { $a <=> $b } map { length } keys %prefix_to_rate );
for my $len ( reverse $shortest .. $longest ) {
print ... (0 Replies)
Discussion started by: jimmy_y
0 Replies
9. Shell Programming and Scripting
Hi
for eg my file has:
val1 | val2 | val1 | val2 | val1 | val2 | val1 | val2 |
here i need to replace '|' with '|\n' where the occurence of '|' is divisble by 2
so that the output comes like this
val1 | val2 |
val1 | val2 |
val1 | val2 |
val1 | val2 |
Requesting suggestions in... (1 Reply)
Discussion started by: raghav288
1 Replies
10. UNIX for Dummies Questions & Answers
My requirement is to replace a a particular pattren in a script from A to B.
I am not sure if this can be done through sed command or through awk .
The file sv.inc is
window DialogBox AddConnection
tag "~ActiveApp/Add Connection - Provider Type?URL"
I would wnat the file to be... (10 Replies)
Discussion started by: bsandeep_80
10 Replies