Search Results

Search: Posts Made By: sb245
1,977
Posted By sb245
thanks vidyadhar85, It removed all the...
thanks vidyadhar85,

It removed all the duplicate lines. But the "BEGIN;" and "COMMIT;" were also needed which is needed in the file. The output came in below syntax.

BEGIN;
replace into...
1,977
Posted By sb245
Match paragraph between two patterns, delete the duplicate paragraphs
Hello all

I have a file my DNS server where there are duplicate paragrapsh like below. How can I remove the duplicate paragraph so that only one paragraph remains.

BEGIN;
replace into domains...
1,509
Posted By sb245
Thank you itkamaraj. It is working. But can you...
Thank you itkamaraj. It is working. But can you modify the script so that the value after BW-IN: is printed in the 2nd column.

20 15000000 10000000

The 1st col: rule number
The 2nd col: BW-IN...
1,509
Posted By sb245
sed/awk script to parse list of bandwidth rules
Hello all gurus,

I have a long list of rules as below:

20 name:abc addr:203.45.247.247/255.255.255.255 WDW-THRESH:12 BW-OUT:10000000bps BW-IN:15000000bps STATSDEVICE:test247 STATS:Enabled...
1,601
Posted By sb245
match pattern 1 and print or match pattern 2 and print
hi all

basically i have file called rules which contain lines like below

/usr/bwmgr/utils/bwmgr em1 -x 735 -name user92 -addr 10.10.201.92 -addrmsk 255.255.255.252 -bwout 1024000 -bwin 2048000...
5,253
Posted By sb245
how to convert a shell script to a php script for displaying next word after pattern match
I have a shell script which I made with the help of this forum

#!/bin/sh
RuleNum=$1

cat bw_rules | sed 's/^.*-x //' | awk -v var=$RuleNum '$1==var {for(i=1;i<=NF;i++) {if($i=="-bwout") print...
5,391
Posted By sb245
thank you all
thank you all
5,391
Posted By sb245
Thank you all What will happen if the line...
Thank you all

What will happen if the line is like below? How to get the same info for number 2255?

/usr/bwmgr/utils/bwmgr em1 -x 2255 -name radius1 -addr a.b.c.0 -addrmsk 255.255.255.224...
26,860
Posted By sb245
thank you all
thank you all
5,391
Posted By sb245
print word after pattern match in two instances
i have a file like below. how can i printout the digits followed by the pattern -bwout and -bwin. say i run the script by entering line number 145 (the fourth line), then the o/p should be like ...
26,860
Posted By sb245
i have a similar situation and i thought i'd drop...
i have a similar situation and i thought i'd drop my question here...

i have a file like below. how to printout the digits followed by the pattern -bwout and -bwin. say i run the script by...
Showing results 1 to 11 of 11

 
All times are GMT -4. The time now is 05:37 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy