Sponsored Content
Top Forums Shell Programming and Scripting how to manipulate with lines while playing with data Post 302353296 by agn on Tuesday 15th of September 2009 04:55:46 AM
Old 09-15-2009
NR represents record number(line number) in awk. So 'NR % 60 == 0' checks if the current line is 60th line and prints the total if it is the 60th line.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

sed or other tool to manipulate data, including email addresses

I have a list of names and email addresses, like this. The <tab> markers are actually tabs. joe.blow <tab> joe.blow@wherever.com tom.t.hall <tab> tom.t.hall@wherever.com john.r.smith <tab> john.r.smith@wherever.com sally.jones <tab> sally.jones@state.or.us I want to parse the data so that... (3 Replies)
Discussion started by: manouche
3 Replies

2. Shell Programming and Scripting

manipulate data with specific format

Hi everybody: I have a problem with how I have to manipulate the data which have specific format like this: 249. 0.30727021E+05 0.30601627E+05 0.37470780E-01 -0.44745335E+02 0.82674536E+03 248. 0.30428182E+05 0.30302787E+05 0.40564921E-01 -0.45210293E+02 ... (5 Replies)
Discussion started by: tonet
5 Replies

3. UNIX for Dummies Questions & Answers

Excel data manipulate

All, I have the following format of data in a spreadsheet A 1 2 3 4 B 1 2 3 4 where 'A' is value of 'A1', '1 2 3 4' is value of cell B1, 'B' is value of cell A2, and '1 2 3 4' is value of cell B2. There... (12 Replies)
Discussion started by: rahulrathod
12 Replies

4. Shell Programming and Scripting

Manipulate lines with sed/awk

Hey All, I need to reorganize a file's text. Here is the source: host John_Doe filename "config.cfg"; hardware ethernet 98:10:3d:13:8f:98; fixed-address 10.10.10.29; } host Jane_Doe filename "config.cfg"; hardware ethernet 98:13:11:fd:5a:57; fixed-address 10.10.5.24; } host... (2 Replies)
Discussion started by: TheBigAmbulance
2 Replies

5. Shell Programming and Scripting

Playing with Volume of data

Quick problem statement: How to read/extract data from a big-big file. Details: We are having a big big problemo in the work we are working at. We are using solaris plarform E25. There is a very big file created somewhere around 200 million records anad the lenght of each record is more than... (3 Replies)
Discussion started by: darshanw
3 Replies

6. Shell Programming and Scripting

Manipulate data in detail problem facing

Input Participant number: HAC Position type Location Distance_start Distance_end Range Mark 1 1 + Front 808 1083 276 2 1 + Front 1373 1636 264 3 1 - Back 1837 2047 211 Participant number: BCD Position type... (6 Replies)
Discussion started by: patrick87
6 Replies

7. Shell Programming and Scripting

Extracting specific lines of data from a file and related lines of data based on a grep value range?

Hi, I have one file, say file 1, that has data like below where 19900107 is the date, 19900107 12 144 129 0.7380047 19900108 12 168 129 0.3149017 19900109 12 192 129 3.2766666E-02 ... (3 Replies)
Discussion started by: Wynner
3 Replies

8. Shell Programming and Scripting

Need help to manipulate data using script

Hi i want to manipulate my data to convert row to column name 600 Slno vlan 1 600 2 609 3 700 name 700 Slno vlan 1 600 2 609 3 700 (8 Replies)
Discussion started by: nith_anandan
8 Replies

9. Shell Programming and Scripting

Extract & Manipulate continous data stream-- tcpdump

Hello; I have this rather tricky problem to solve --(to me, anyways) .. I am processing the following one liner with tcpdump.. tcpdump -i T3501 -A ether host 00:1e:49:29:fc:c9 or ether host 00:1b:2b:86:ec:1b or ether host 00:21:1c:98:a4:08 and net 149.83.6.0/24 | grep --line-buffered -B... (5 Replies)
Discussion started by: delphys
5 Replies

10. Shell Programming and Scripting

Help - manipulate data by columns and repeated

Hello good afternoon to everyone. I'm new to the forum and would like to request your help in handling data. I hope my English is clear. I have a file (Dato01.txt) to contine the following structure. # Col1 - Col2 - Col3 - Col4 Patricia started Jun 22 05:22:58 Carolina started Jun... (5 Replies)
Discussion started by: kelevra
5 Replies
IEEE1284_DATA(3)						     Functions							  IEEE1284_DATA(3)

NAME
ieee1284_read_data, ieee1284_write_data, ieee1284_data_dir, ieee1284_wait_data - control the data lines SYNOPSIS
#include <ieee1284.h> int ieee1284_read_data(struct parport *port); void ieee1284_write_data(struct parport *port, unsigned char dt); int ieee1284_data_dir(struct parport *port, int reverse); int ieee1284_wait_data(struct parport *port, unsigned char mask, unsigned char val, struct timeval *timeout); DESCRIPTION
These functions manipulate the data lines of the parallel port associated with port (which must have been claimed using ieee1284_claim(3)). The lines are represented by an 8-bit number (one line per bit) and a direction. The data lines are driven as a group; they may be all host-driven (forward direction) or not (reverse direction). When the peripheral is driving them the host must not. For ieee1284_data_dir the reverse parameter should be zero to turn the data line drivers on and non-zero to turn them off. Some port types may be unable to switch off the data line drivers. Setting the data lines may have side effects on some port types (for example, some Amiga ports pulse nStrobe). ieee1284_wait_data waits, up until the timeout, for the data bits specified in mask to have the corresponding values in val. RETURN VALUE
ieee1284_read_data returns the 8-bit number representing the data lines unless it is not possible to return such a value with this port type, in which case it returns an error code. Possible error codes: E1284_NOTAVAIL Bi-directional data lines are not available on this system. E1284_INVALIDPORT The port parameter is invalid (perhaps it has not been claimed, for instance). E1284_SYS There was an error at the operating system level, and errno has been set accordingly. E1284_TIMEDOUT The timeout has elapsed. Whereas ieee1284_read_data may return E1284_NOTAVAIL on its first invocation on the port, if it does not do so then it cannot until ieee1284_close is called for that port. AUTHOR
Tim Waugh <twaugh@redhat.com> Author. COPYRIGHT
Copyright (C) 2001-2003 Tim Waugh 09/18/2007 IEEE1284_DATA(3)
All times are GMT -4. The time now is 04:14 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy