Search Results

Search: Posts Made By: naveen@
3,622
Posted By birei
Here you have a perl script: use warnings; ...
Here you have a perl script:

use warnings;
use strict;

die qq[Usage: perl $0 <input-file>\n] unless @ARGV == 1;

my ($shift_port, $port3, @lines, @ports);

while ( <> ) {
chomp;

...
Forum: Programming 02-28-2012
2,132
Posted By Corona688
$ cat shiftport2.awk BEGIN { C=1 ...
$ cat shiftport2.awk

BEGIN { C=1 }

# Save all lines for printing/substitution later
{ LINE[NR]=$0 }

/[{}]/ { # Count brackets to find code blocks
...
Forum: Programming 02-28-2012
2,132
Posted By Corona688
which port? port1, port2, or port3?
which port? port1, port2, or port3?
3,622
Posted By birei
Hi naveen@, I don't understand your perl...
Hi naveen@,

I don't understand your perl script. It outputs nothing with that input file, and I think you didin't match the exact withespace.

Try next one:

$ cat infile
V {
port1 ...
Forum: Programming 02-27-2012
2,132
Posted By Corona688
$ cat shiftport.awk /shift_port/ { ...
$ cat shiftport.awk

/shift_port/ {
# Do some matching to get the value of shift_port
split($0, A, ";"); # Split on ; to get statement
N=split(A[1], A, "="); #...
Showing results 1 to 5 of 5

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