Sponsored Content
Top Forums Shell Programming and Scripting Report filtering - Weird issue and interesting - UrgentPlease Post 302296578 by ajilesh on Wednesday 11th of March 2009 10:56:38 AM
Old 03-11-2009
Report filtering - Weird issue and interesting - UrgentPlease

Hi,

Could any one help me to extract data from a report.
I would like to get the two lines which are just below the separations

I have a report like this
--------------------------------------------------------------------------
Pid Command Inuse Pin Pgsp Virtual 64-bit Mthrd 16MB
504056 vxconfigd.5.3 26898 6682 4626 30746 N Y N

PageSize Inuse Pin Pgsp Virtual
s 4 KB 8178 6682 4498 11994
m 64 KB 1170 0 8 1172

Vsid Esid Type Description PSize Inuse Pin Pgsp Virtual
1d0ad d work shared library text m 1170 0 8 1172
-------------------------------------------------------------------------
Pid Command Inuse Pin Pgsp Virtual 64-bit Mthrd 16MB
368854 vxsvc 26333 6701 7375 33337 N Y N

PageSize Inuse Pin Pgsp Virtual
s 4 KB 7613 6701 7247 14585
m 64 KB 1170 0 8 1172

--------------------------------------------------------------------------
Pid Command Inuse Pin Pgsp Virtual 64-bit Mthrd 16MB
577624 ksh 25890 6677 3910 29611 N N N

PageSize Inuse Pin Pgsp Virtual
s 4 KB 7170 6677 3782 10859
m 64 KB 1170 0 8 1172

I would like to get 2 lines which are just below the separation. you can see the lines in bold.
Appreciate quicker reponse.
Thanks in advance.
Ajilesh
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Weird SSH issue

hey all, I guess I'm the newbie on these boards, anyways, hello. I recently became the admin for a few Solaris machines, and I have recently discovered an issue with SSH on one of my machines. On one of my machines, I can only SSH into the machine as root. I have tried the newest version... (6 Replies)
Discussion started by: AKM
6 Replies

2. UNIX for Advanced & Expert Users

weird domain issue.

OK so i have a virtual server where i store files. one day i tied to login and i couldn't connect to my sevrer so i logged into my ssh and checked to see if the process was running. proftp was not. I then tried to start it manually and got the error below. Now the domain listed there is not mine... (2 Replies)
Discussion started by: thirddegreekris
2 Replies

3. UNIX for Advanced & Expert Users

Weird Awk issue

Hi All, a bit of a weird one here. I'm trying to pass a variable into an awk command, and I keep getting an error. I have the line nawk -F"," -v red=$random_variable '{print $red}' $w_dir/$file_name > $w_dir/${column_name} that keeps failing with the error nawk: can't open file {print... (17 Replies)
Discussion started by: Khoomfire
17 Replies

4. HP-UX

Weird Issue with crontab.

Hello all, Normally I'm pretty comfortable with crontab, changing and updating (done it many-a-time). But in the last two days I've been pulling my hair out over the following... Details of OS: HP-UX mdirect B.11.23 U ia64 2587410573 unlimited-user license Issue: Execute a script (very... (3 Replies)
Discussion started by: Cameron
3 Replies

5. Shell Programming and Scripting

weird issue about h, g, x in SED

I have a file called merge2.t: Hi Hello how are you. </Endtag> <New> I am fine.</New> This is a test. freelong how Here is the SED: sed -n ' /<\/Endtag>/ !{ H } /<\/Endtag>/ { x p } (4 Replies)
Discussion started by: freelong
4 Replies

6. Programming

Interesting issue with pthread_mutex_lock and siglongjmp in AIX 5.3 (and no other OS)

Executive summary: Code (posted below) cores in AIX 5.3, despite being compiled and run successfully on several other operating systems. Code is attempting to verify that pthread_mutex_lock can be successfully aborted by siglongjmp. I do not believe this is an unreasonable requirement. If... (1 Reply)
Discussion started by: DreamWarrior
1 Replies

7. UNIX for Advanced & Expert Users

Weird SUID issue

Hi, I am setting up SUID permissions on a binary. It gets set for most of the users, however, 1 in 10 users is unable to set these. For those who works: > chmod 6555 Test > ls -l Test -r-sr-sr-x 1 A B 5524 Nov 15 14:53 Test For those where it doesn't work: > chmod 6555 Test... (14 Replies)
Discussion started by: vibhor_agarwali
14 Replies

8. AIX

Weird nfs issue after TL upgrade

We recently upgraded 2 of our AIX 6.1 servers from TL4 to TL5. Both servers are on the same p7 780 frame, installed at the same time from the same image. Both servers are mounting the same nfs share after reboot what worked perfectly fine until the upgrade. Since the patching, one of the two... (5 Replies)
Discussion started by: zxmaus
5 Replies

9. Shell Programming and Scripting

weird equal variable issue

I run this #!/bin/bash cron=$(ps aux | grep crond | grep -v grep | grep -o crond| uniq) echo "cron :$cron:" if ; then echo "OK: crond service running fine on `hostname`" exit 2 else echo "CRITICAL: crond service not running on `hostname`" exit 0... (2 Replies)
Discussion started by: anil510
2 Replies

10. War Stories

Interesting script issue clubbed with crontab.

Hello All, Finally I am posting an issue and it's solution which I faced last week. Let me explain it by headings. Issue's background: It was a nice Tuesday for me, went to office as usual started checking emails and work assigned to me. Suddenly a gentleman reached out to me on my desk(in a... (2 Replies)
Discussion started by: RavinderSingh13
2 Replies
LP(4)							   BSD Kernel Interfaces Manual 						     LP(4)

NAME
lp -- printer port Internet Protocol driver SYNOPSIS
ifconfig plip0 myaddress hisaddress [-link0] device ppbus device plip device ppc DESCRIPTION
The lp driver allows a PC parallel printer port to be used as a point-to-point network interface between two similarly configured systems. Data is transferred 4 bits at a time, using the printer status lines for input: hence there is no requirement for special bidirectional hard- ware and any standard AT-compatible printer port with working interrupts may be used. During the boot process, for each plip device which is probed and has an interrupt assigned, a corresponding network device is created. Configuring an lp device with ifconfig(8) causes the corresponding parallel port bus to be reserved for PLIP until the network interface is configured 'down'. The communication protocol is selected by the link0 flag: -link0 (default) Use FreeBSD mode (LPIP). This is the simpler of the two modes and therefore slightly more efficient. link0 Use Crynwr/Linux compatible mode (CLPIP). This mode has a simulated Ethernet packet header, and is easier to interface to other types of equipment. The interface MTU defaults to 1500, but may be set to any value. Both ends of the link must be configured with the same MTU. Cable Connections The cable connecting the two parallel ports should be wired as follows: Pin Pin Description 2 15 Data0 -> ERROR* 3 13 Data1 -> SLCT 4 12 Data2 -> PE 5 10 Data3 -> ACK* 6 11 Data4 -> BUSY 15 2 ERROR* -> Data0 13 3 SLCT -> Data1 12 4 PE -> Data2 10 5 ACK* -> Data3 11 6 BUSY -> Data4 18-25 18-25 Ground Cables with this wiring are widely available as 'Laplink' cables, and are often coloured yellow. The connections are symmetric, and provide 5 lines in each direction (four data plus one handshake). The two modes use the same wiring, but make a different choice of which line to use as handshake. FreeBSD LPIP mode The signal lines are used as follows: Data0 (Pin 2) Data out, bit 0. Data1 (Pin 3) Data out, bit 1. Data2 (Pin 4) Data out, bit 2. Data3 (Pin 5) Handshake out. Data4 (Pin 6) Data out, bit 3. ERROR* (pin 15) Data in, bit 0. SLCT (pin 13) Data in, bit 1. PE (pin 12) Data in, bit 2. BUSY (pin 11) Data in, bit 3. ACK* (pin 10) Handshake in. When idle, all data lines are at zero. Each byte is signalled in four steps: sender writes the 4 most significant bits and raises the hand- shake line; receiver reads the 4 bits and raises its handshake to acknowledge; sender places the 4 least significant bits on the data lines and lowers the handshake; receiver reads the data and lowers its handshake. The packet format has a two-byte header, comprising the fixed values 0x08, 0x00, immediately followed by the IP header and data. The start of a packet is indicated by simply signalling the first byte of the header. The end of the packet is indicated by inverting the data lines (i.e., writing the ones-complement of the previous nibble to be transmitted) without changing the state of the handshake. Note that the end-of-packet marker assumes that the handshake signal and the data-out bits can be written in a single instruction - otherwise certain byte values in the packet data would falsely be interpreted as end-of-packet. This is not a problem for the PC printer port, but requires care when implementing this protocol on other equipment. Crynwr/Linux CLPIP mode The signal lines are used as follows: Data0 (Pin 2) Data out, bit 0. Data1 (Pin 3) Data out, bit 1. Data2 (Pin 4) Data out, bit 2. Data3 (Pin 5) Data out, bit 3. Data4 (Pin 6) Handshake out. ERROR* (pin 15) Data in, bit 0. SLCT (pin 13) Data in, bit 1. PE (pin 12) Data in, bit 2. ACK* (pin 10) Data in, bit 3. BUSY (pin 11) Handshake in. When idle, all data lines are at zero. Each byte is signalled in four steps: sender writes the 4 least significant bits and raises the hand- shake line; receiver reads the 4 bits and raises its handshake to acknowledge; sender places the 4 most significant bits on the data lines and lowers the handshake; receiver reads the data and lowers its handshake. [Note that this is the opposite nibble order to LPIP mode]. Packet format is: Length (least significant byte) Length (most significant byte) 12 bytes of supposed MAC addresses (ignored by FreeBSD). Fixed byte 0x08 Fixed byte 0x00 <IP datagram> Checksum byte. The length includes the 14 header bytes, but not the length bytes themselves nor the checksum byte. The checksum is a simple arithmetic sum of all the bytes (again, including the header but not checksum or length bytes). FreeBSD calculates outgoing checksums, but does not validate incoming ones. The start of packet has to be signalled specially, since the line chosen for handshake-in cannot be used to generate an interrupt. The sender writes the value 0x08 to the data lines, and waits for the receiver to respond by writing 0x01 to its data lines. The sender then starts signalling the first byte of the packet (the length byte). End of packet is deduced from the packet length and is not signalled specially (although the data lines are restored to the zero, idle state to avoid spuriously indicating the start of the next packet). SEE ALSO
ppbus(4), ppc(4), ifconfig(8) BUGS
Busy-waiting loops are used while handshaking bytes, (and worse still when waiting for the receiving system to respond to an interrupt for the start of a packet). Hence a fast system talking to a slow one will consume excessive amounts of CPU. This is unavoidable in the case of CLPIP mode due to the choice of handshake lines; it could theoretically be improved in the case of LPIP mode. Polling timeouts are controlled by counting loop iterations rather than timers, and so are dependent on CPU speed. This is somewhat sta- bilised by the need to perform (slow) ISA bus cycles to actually read the port. BSD
March 4, 1996 BSD
All times are GMT -4. The time now is 08:09 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy