Sponsored Content
Full Discussion: awk read RS
Top Forums Shell Programming and Scripting awk read RS Post 302645585 by radoulov on Wednesday 23rd of May 2012 06:24:35 PM
Old 05-23-2012
Code:
awk '/^!/ && prf { 
    print atm, atm_, vp, vc, prf, encap
    print "bind", (encap == "pppoe" ? "authentication pap maximum 1" : iface)
    prf = encap = x    
  }
/atm pvc/ { 
  atm = $1; atm_ = $2; vp = $4; 
  vc = $5; prf = "profile dsl-" $7 
  }
/encapsulation/ { encap = $2 }
/ip description/ { iface =  "interface " $3 " [ADSL]" }
  ' infile


Last edited by radoulov; 05-23-2012 at 07:32 PM.. Reason: Shortened ...
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help with awk - read from file

Hi, I've got a file like the following: Starting to process segment 0 (and symmetry related segments) Number of (cancelled) singularities: 0 Number of (cancelled) negative numerators: 0 Segment 0: 5.49secs Starting to process segment 1 (and symmetry related segments) Number of... (7 Replies)
Discussion started by: giorgos193
7 Replies

2. Shell Programming and Scripting

File Read using awk

Hi, I need to read two colums(4th and 5th) from a file and do some manipulation Input file is 401500 IOC Q 14 14 406200 LC Q 1 1 410124 IOC Q 5 4 410124 LC Q 11 8 410132 IOC Q 230 229 410148 IOC Q ... (3 Replies)
Discussion started by: rejirajraghav
3 Replies

3. Shell Programming and Scripting

How to re-read a file in AWK

Hi , i am having some problem with re-reading the same file in AWK. here is the scenario. function 1 { some_string > " file1 " # i have redirected output to file1. ........... ........ } Now in function 2 { ... (1 Reply)
Discussion started by: madhaviece
1 Replies

4. Shell Programming and Scripting

Using awk to read a field

I am trying to output the total number of records that have name and address within there specific fields i.e. $6 (surname) $9 (address). The file that redirects in is a csv file. The code is wrong somewhere as i have another awk similar to this that reads in the same file and that works... (2 Replies)
Discussion started by: Pablo_beezo
2 Replies

5. UNIX for Dummies Questions & Answers

Using Awk within awk to read all files in directory

I am wondering if anyone has any idea how to use an awk within awk to read files and find a match which adds to count. Say I am searching how many times the word crap appears in each files within a directory. How would i do that from the command prompt ... thanks (6 Replies)
Discussion started by: flevongo
6 Replies

6. Shell Programming and Scripting

Read content between xml tags with awk, grep, awk or what ever...

Hello, I trying to extract text that is surrounded by xml-tags. I tried this cat tst.xml | egrep "<SERVER>.*</SERVER>" |sed -e "s/<SERVER>\(.*\)<\/SERVER>/\1/"|tr "|" " " which works perfect, if the start-tag and the end-tag are in the same line, e.g.: <tag1>Hello Linux-Users</tag1> ... (5 Replies)
Discussion started by: Sebi0815
5 Replies

7. Shell Programming and Scripting

Awk and read bailing out

Hi All, Can some body help me in this to work #!/bin/ksh nof=`wc -l outFile_R.out | sed -e 's/*//g' ` no_of_lines=`expr $nof - 0` z=1 while ] do cat outFile_R.out | awk -v I="$z" 'NR==I { print $0 }' | read from_date to_date id echo "executing $from_date... (2 Replies)
Discussion started by: sol_nov
2 Replies

8. Shell Programming and Scripting

How to use awk with while read line

Hi All, Content of mydatafile- Name Age -------------- --------------- Raju P 20 years Hari 25 years Priya S 30 years I need output like- The age of Raju P is 20 years The age of Hari is 25 years The age of Priya S is... (3 Replies)
Discussion started by: NARESH1302
3 Replies

9. Shell Programming and Scripting

read the variable with awk

final.txt file contains SY10020021 SY10023077 3199 4 803.815 11884 4 1825.22 2.2707 say set FIRSTLINE = SY10020021 set SECONDLINE=SY10023077 cat final.txt | awk '{if($1==${FIRSTLINE} & $2==${SECONDLINE}){print $9}else{print "ll"}}'..............this should give me value... (1 Reply)
Discussion started by: Indra2011
1 Replies

10. Shell Programming and Scripting

Read a file using awk for a given no of lines.

Hi, how do i read a file using awk for a given no of line? e.g 1. read only first 50 line. 2. read starting from line 20 to line 60.. thanks in advance. -alva (8 Replies)
Discussion started by: alvagenesis
8 Replies
FATM(4)                                                    BSD Kernel Interfaces Manual                                                    FATM(4)

NAME
fatm -- device driver for Fore PCA200E ATM interfaces SYNOPSIS
device fatm device utopia device atm options NATM DESCRIPTION
The fatm device driver supports the FORE (now Marconi) PCA200E ATM interface cards. The driver interfaces with the natm(4) framework, netgraph(4) and HARP. It provides only PVC services. Signalling, ATMARP, ILMI and other higher layer protocols are implemented using netgraph(4) or HARP. For configuring the card for IP see natmip(4). The following sysctls are recognized by the driver additionally to those handled by utopia(4): hw.atm.fatmN.stats Returns a device specific statistic list of uint32_t statistic counters. hw.atm.fatmN.istats Returns a list of uint32_t with internal driver statistics. hw.atm.fatmN.retry_tx If this is set packets are stuffed back into the interface's send queue when the cards transmit queue is found to be full. They are transmitted later. If this is not set the packets are dropped. It may be useful to set this if only UBR traffic is sent. hw.atm.fatmN.debug (Only if debugging enabled.) These are debugging flags. See src/sys/dev/fatm/if_fatmvar.h for the possible flags. The driver supports the media options sdh, noscramb and unassigned (see utopia(4)). DIAGNOSTICS
fatm0: <FORE PCA200E> mem 0xd5800000-0xd59fffff irq 9 at device 9.0 on pci0 SEE ALSO
natm(4), natmip(4), utopia(4) AUTHORS
Harti Brandt <harti@FreeBSD.org> BUGS
These cards can CBR shape a single VCC only. It is currently possible to request more than one CBR connection. In this case all the timing will be wrong. See hatm(4) for a better card. BSD May 15, 2003 BSD
All times are GMT -4. The time now is 01:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy