hi,
to all
give me some idea below scripts
file=`cat filelist`
for filename in $file
do
awk '{
if ($0 ~ /system/ && flag == 0) {
flag=1;
print $0;
}
else if ($0 ~ /system/ && flag == 1) {
printf("%s SYSLAY %s %s %s\n",$1,$3, $4, $5);
}
else
print $0;
}' $filename >... (6 Replies)
Hello
How do I combine the following 2 codes in one, the purpose is to not generate the outfile1
awk '{print $9 "\t" $10 "\t" $11}' infile > outfile1
awk '{ gsub(/.fa/,""); print }' outfile1 > outfile2
Thanks
Joseph (2 Replies)
Hello experts,
I have separate scripts (KSH) each for Solaris and AIX to install core applications (e.g. BigBrother). I also have a script called Installer that gives a menu list to select a particular application to install from a bunch of applications.
Now I am trying to combine separate... (7 Replies)
I have an awk statement that works but I am calling awk twice and I know there has to be a way to combine the two statements into one. The purpose is to pull out just the ip address from loopback1.
cat config.txt | nawk 'BEGIN {FS="\n"}{RS="!"}{if ( $0 ~ "interface loopback1" ) print$4}' | nawk... (5 Replies)
I need to combine two scripts, into one script. One is to delete something, the to recreate. Here is the scripts:
BIN=/usr/lbin
LINE='device for 0101a01: lpd://172.25.41.111:515'
while read LINE
do
prt=`echo $LINE | awk '{print $3 }'| cut -c 1-7`
echo $prt
#drv=`echo $LINE | awk -F":"... (4 Replies)
Hi Everyone,
awk 'BEGIN{print strftime("%c",1272814948)}' | tr -d '\n'
how to change tr -d '\n' to be part of the awk? means awk this pchoh time, and awk also remove '\n', instead of using "|" to combine "tr" command.
Thanks (2 Replies)
ignore the simplicity of the foo file, my actual file is much more hardcore but this should give you the jist of it. need to combine the two awks into one liner. essentially, need to return the value of one particular field in a file that has multiple comma separated fields. thanks guys
cat foo... (1 Reply)
Need some help with this ... please
60644,NJ090237_0263_GRP,NJ090237_0263_VIEW,NJ090237_0263_PSGRP,NJ090237_0263_GOLD_CSGRP,,06E:0_08E:0_09E:0_11E:0,0CE5,TDEV,34,VP_TIER... (3 Replies)
my code:
gawk 'NR>'"${LASTLINENUM}"' && NR<='"${LINEENDNUM}"'' ${LOGFILE} | gawk '{l=$0;} /'"${STRING1}"'/ && /'"${STRING2}"'/ {for (i=NR-'"${BEFOREGLAF}"'; i<=NR+'"${AFTERGLAF}"'; i++) o=i; t++;} END { for(i=1; i<=NR; i++) if (o) print l; print t+=0;}'
i would like to combine this into one... (5 Replies)
Discussion started by: SkySmart
5 Replies
LEARN ABOUT PLAN9
ppp
PPP(1) General Commands Manual PPP(1)NAME
pppclient, pppserver - point to point protocol
SYNOPSIS
pppclient [ -d ][ -b baudrate ][ -i myipaddr ][ -p peeripaddr ][ dialdevice ]
pppserver [ -d ] ndev myipaddr firstipaddr firstdev [ baud0 baud1 ... ]
DESCRIPTION
The Point to Point Protocol is used to encapsulate Internet Protocol packets for transfer over serial lines or other protocol connections.
Pppclient makes a connection to a PPP server and passes IP packets over the connection. If dialdevice is omitted, standard input and out-
put are used as the connection. If dialdevice begins with a slash, pppclient assumes it is a file name, open(2)'s it, and uses the result
as the connection. Otherwise, dialdevice is passed as the destination address to dial(2) to set up the connection.
If the connection is successful, pppclient creates a pipe, pushes the IP line discipline onto it, and sets the local and remote addresses
of the IP interface to myipaddr and peeripaddr. It then loops transferring packets between the pipe and the connection. If either myi-
paddr or peeripaddr is omitted, pppclient requests them from the server.
The options are
d print debugging information.
b baud rate of the serial line.
p peer ip address (in case the peer asks for its ip address over IPCP).
i the local ip address to be established for this connection.
Pppserver treats serial lines as PPP connections, switching packets between them and the local machine. It creates a pipe for a local IP
interface (address myipaddr), opens a set of serial lines, and switches packets between the local interface and the serial lines. Ndev
specifies the number of serial devices to serve. The devices are named /dev/eia{firstdev} through /dev/eia{firstdev+ndev-1}. Their remote
IP addresses are firstipaddr through firstipaddr+ndev-1. The default baud rate is 9600. If any arguments follow firstdev (baud0, baud1,
...), they are used as baud rates for the serial lines. The only option, -d, turns on debugging output.
Both pppclient and pppserver accept all options defined in RFCs 1331 and 1332.
EXAMPLES
Start up a server for serial lines /dev/eia[2-6] with remote IP addresses 131.107.1.100 through 131.107.1.103 and baud rates of 19200,
2400, 9600, 9600. The local IP address is 131.107.1.1.
pppserver 4 131.107.1.1 131.107.1.100 2 19200 2400
SOURCE
/sys/src/cmd/ppp
PPP(1)