Sponsored Content
Full Discussion: sed OR-Operation
Top Forums Shell Programming and Scripting sed OR-Operation Post 302426548 by aigles on Wednesday 2nd of June 2010 07:11:12 AM
Old 06-02-2010
Another way:
Code:
for i in `ls newestconfigs/ | grep confg`
do
  awk '
      /^hostname/ { host=$2 ; next }
      /^interface (Loopback0|Vlan80)/ { getIp=1 ; next }
      getIp { print host ": " $2 ; exit }

  ' newestconfigs/$i
done

Jean-Pierre.

Last edited by aigles; 06-02-2010 at 08:20 AM..
This User Gave Thanks to aigles For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

string operation

i am new user of unix.i have a question.My script is- export STR_ALFA=`head -2 "${FILE_PATH}"|tail -1|cut -d"," -f1` "${TEST_HOME}"/function/chk_alfa.ksh STR_ALFA now i want to check STR_ALFA: 1)whether is alphabetic 2)whether is numeric 3)whether is alphanumeric... (1 Reply)
Discussion started by: arghya_owen
1 Replies

2. Shell Programming and Scripting

sed command for substring operation

Hi All, Input=abcDEF_1.6k1 I need to use ‘sed' command to get 1.6 value and store to some variable from the given input. Please help me in getting the command. Regards, Kalai (2 Replies)
Discussion started by: kalpeer
2 Replies

3. Shell Programming and Scripting

File Operation

I have one text file like 1 filename 2 filename2 3 hi 4 myname i have one variable in which i have index value..i.e.1,2,3 and so... i want to copy value after the index into somevariable..... how i can do it.... (2 Replies)
Discussion started by: AbhijitIT
2 Replies

4. Shell Programming and Scripting

String Operation

/home8/mc09ats/UnixCw/file4 this is the path...i have 2 variables filename and filepath...i want filename=file4 filepath=/home8/mc09ats/UnixCw i.e. i think i have to find last occurence of "/" in string and the string after "/" want to take in some variable and string before last "/"... (4 Replies)
Discussion started by: AbhijitIT
4 Replies

5. Solaris

Operation and Maintenance

I gurus of Solaris, I need to do a Procedure concerning in the Maintenance of Solaris Server. What are the parameters that I must be see Periodically in a Server. For example the space I (df -h) must be each week.- In this server exist a Database aplication (Oracle), and log's that increase or... (4 Replies)
Discussion started by: andresguillen
4 Replies

6. Shell Programming and Scripting

Column operation : cosne and sine operation

I have a txt file with several columns and i want to peform an operation on two columns and output it to a new txt file . file.txt 900.00000 1 1 1 500.00000 500.00000 100000.000 4 4 1.45257346E-07 899.10834 ... (4 Replies)
Discussion started by: shashi792
4 Replies

7. Shell Programming and Scripting

Sed emptying file when i use for search replace operation

Hi Friends I am new to sed programming , i found that the below code can search for the $ToSearch and Replace it with $ToReplace ( $ToSearch and $ToReplace are my variables in my script ) sed "s/$ToSearch/$ToReplace/" $file > $output mv $output $file In testing the script i found that... (3 Replies)
Discussion started by: rakeshkumar
3 Replies

8. Shell Programming and Scripting

sed command to skip the first line during find and replace operation

Hi Gurus, I did an exhaustive search for finding the script using "sed" to exclude the first line of file during find and replace. The first line in my file is the header names. Thanks for your help.. (4 Replies)
Discussion started by: ks_reddy
4 Replies

9. Shell Programming and Scripting

Complex string operation (awk, sed, other?)

I have a file that contains RewriteRules for 200 countries (2 examples for 1 country below): RewriteRule ^/at(/|/index.html|)$ http://%{HTTP_HOST}/locate/index.html?locale=de_AT #& RewriteRule ^/at_english(/|/index.html|)$ http://%{HTTP_HOST}/locate/index.html?locale=en_AT I have... (5 Replies)
Discussion started by: usshadowop
5 Replies

10. Shell Programming and Scripting

Multiple Replacement in a Text File in one operation (sed/awk) ?

Hi all, Saying we have two files: 1. A "Reference File" whose content is "Variable Name": "Variable Value" 2. A "Model File" whose content is a model program in which I want to substitute "VariableName" with their respective value to produce a third file "Program File" which would be a... (4 Replies)
Discussion started by: dae
4 Replies
fwb_pix(1)							 Firewall Builder							fwb_pix(1)

NAME
fwb_ipt - Policy compiler for Cisco PIX SYNOPSIS
fwb_pix -fdata_file.xml [-V] [-dwdir] [-i] [-v] [-xc] [-xt] object_name DESCRIPTION
fwb_pix is firewall policy compiler component of Firewall Builder (see fwbuilder(1)). Compiler reads objects definitions and firewall description from the data file specified with "-f" option and generates resultant Cisco PIX configuration file. The configuration is writ- ten to the file with the name the same as the name of the firewall object, plus extension ".fw". The data file and the name of the firewall objects must be specified on the command line. Other command line parameters are optional. OPTIONS
-f FILE Specify the name of the data file to be processed. -d wdir Specify working directory. Compiler creates file with PIX configuration in this directory. If this parameter is missing, then PIX configuration will be placed in the current working directory. -v Be verbose: compiler prints diagnostic messages when it works. -V Print version number and quit. -i When this option is present, the last argument on the command line is supposed to be firewall object ID rather than its name -xc When output file name is determined automatically (i.e. flags -o or -O are not present), the file name is composed of the cluster name and member firewall name rather than just member firewall name. This is used mostly for testing when the same member firewall object can be a part of different clusters with different configurations. -xt This flag makes compiler treat all fatal errors as warnings and continue processing rules. Generated configuration script most likely will be incorrect but will include error message as a comment; this flag is used for testing and debugging. URL
Firewall Builder home page is located at the following URL: http://www.fwbuilder.org/ BUGS
Please report bugs using bug tracking system on SourceForge: http://sourceforge.net/tracker/?group_id=5314&atid=105314 SEE ALSO
fwbuilder(1), fwb_ipf(1), fwb_ipt(1) fwb_pf(1) FWB
fwb_pix(1)
All times are GMT -4. The time now is 05:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy