Sponsored Content
Top Forums UNIX for Dummies Questions & Answers seperating records with numbers from a set of numbers Post 302261611 by Shiv@jad on Tuesday 25th of November 2008 07:53:40 AM
Old 11-25-2008
seperating records with numbers from a set of numbers

I have two files one (numbers file)contains the numbers(approximately 30000) and the other file(record file) contains the records(approximately 40000)which may or may not contain the numbers from that file.

I want to seperate the records which has the field 1=(any of the number from numbers file). Can you please suggest how it can be achieved without having performance issues.

Smilie
Regards
Shiv@jad
 

10 More Discussions You Might Find Interesting

1. Programming

How to set constrain on random numbers in c

Hi, I am currently trying to generate multiple random numbers in C for different variable:- die1=1+(rand()%5); die2=1+(rand()%5); die3=1+(rand()%5); die4=1+(rand()%5); But I need to contrain the total of die1, die2,die3 and die4 to be 5 as well. If i insert die1+die2+die3+die4=5, i do... (6 Replies)
Discussion started by: ahjiefreak
6 Replies

2. Shell Programming and Scripting

Numbers of records in SAS dataset

I'm declaring a variable within a Korn shell to represent the total number of records in a SAS dataset and could use a little help with the syntax. This is what I have thus far: #!/usr/bin/ksh RecCount = `sas -x "select count(*) from /users/abc/123/sas_dataset.sas7bdat"` (2 Replies)
Discussion started by: sasaliasim
2 Replies

3. Shell Programming and Scripting

read numbers from file and output which numbers belongs to which range

Howdy experts, We have some ranges of number which belongs to particual group as below. GroupNo StartRange EndRange Group0125 935300 935399 Group2006 935400 935476 937430 937459 Group0324 935477 935549 ... (6 Replies)
Discussion started by: thepurple
6 Replies

4. Shell Programming and Scripting

how to delete records with the given line numbers

I have a file which has about 10000 records and I need to delete about 50 records from the file. I know line numbers and am using sed '134,1357,......d' filename > new file. It does not seem to be working. Please Advice (5 Replies)
Discussion started by: mad_man12
5 Replies

5. Shell Programming and Scripting

How to take set of numbers?

I have to take a list of numbers from the keyboard and not by passing arguments. How will I read a set of numbers in such a way that I can use any number I wish to operate upon. Is there any specific command to do so. As said before I dont want to pass the numbers as arguments from command line.... (3 Replies)
Discussion started by: VishBoy
3 Replies

6. Shell Programming and Scripting

the smallest number from 90% of highest numbers from all numbers in file

Hello All, I am having problem to find what is the smallest number from 90% of highest numbers from all numbers in file. I am having file with thousands of lines and hundreds of columns. I am familiar mainly with bash but I am open to whatever suggestion witch will lead to the solutions. If I... (11 Replies)
Discussion started by: Apfik
11 Replies

7. Shell Programming and Scripting

replace numbers in records

hello every one I have file with following records begin ASX120016719 ASX190006729 ASX153406729 ASX190406759 ASX180006739 end for each record there is ASX word then 9 digits after it (NO spaces included) what i want is to : 1- skip ASX 2-skip first 2 digits after ASX word... (16 Replies)
Discussion started by: neemoze
16 Replies

8. UNIX for Dummies Questions & Answers

Print numbers and associated text belonging to an interval of numbers

##### (0 Replies)
Discussion started by: lucasvs
0 Replies

9. Shell Programming and Scripting

awk - set numbers [ 1 ... n] from the 6 line

Hi, i have a file, where measurement-data is stored in the first column. The file has also a header of 5 lines. I want to set counting up numbers in front of any particular measurement-value; should start at the 6. line with starting number 1. i try to solve it with ... awk 'NR > 6 { print... (6 Replies)
Discussion started by: IMPe
6 Replies

10. UNIX for Beginners Questions & Answers

Decimal numbers and letters in the same collums: round numbers

Hi! I found and then adapt the code for my pipeline... awk -F"," -vOFS="," '{printf "%0.2f %0.f\n",$2,$4}' xxx > yyy I add -F"," -vOFS="," (for input and output as csv file) and I change the columns and the number of decimal... It works but I have also some problems... here my columns ... (7 Replies)
Discussion started by: echo manolis
7 Replies
acct(1M)																  acct(1M)

NAME
acct: acctdisk, acctdusg, accton, acctwtmp, closewtmp, utmp2wtmp - overview of accounting and miscellaneous accounting commands SYNOPSIS
file] file] [file] reason DESCRIPTION
Accounting software is structured as a set of tools (consisting of both C programs and shell procedures) that can be used to build account- ing systems. The shell procedures, described in acctsh(1M), are built on top of the C programs. Connect time accounting is handled by various programs that write records into the The programs described in acctcon(1M) convert this file into session and charging records which are then summarized by (see acctmerg(1M)). Process accounting is performed by the HP-UX system kernel. Upon termination of a process, one record per process is written to a file (normally The programs in acctprc(1M) summarize this data for charging purposes; is used to summarize command usage (see acctcms(1M)). Current process data can be examined using (see acctcom(1M)). Process accounting and connect time accounting (or any accounting records in the format described in acct(4)) can be merged and summarized into total accounting records by (see the format in acct(4)). is used to format any or all accounting records (see acctsh(1M)). reads lines that contain user ID, login name, and number of disk blocks, and converts them to total accounting records that can be merged with other accounting records. reads its standard input (usually from and computes disk resource consumption (including indirect blocks) by login. Only files found under login directories (as determined from the password file) are accounted for. All files under a login directory are assumed to belong to that user regardless of actual owner. If is given, records consisting of those file names for which charges no one are placed in file (a potential source for finding users trying to avoid disk charges). If is given, file is the name of the password file. This option is not needed if the password file is (See diskusg(1M) for more details.) turns process accounting off if the optional file argument is omitted. If file is given, it must be the name of an existing file, to which the kernel appends process accounting records (see acct(2) and acct(4)). writes a utmp record to its standard output if the option is not used. If the option is used, writes a record to The record contains the current time and a string of characters that describe the reason for writing the record. A record type of is assigned (see utmp(4) and utmps(4)). The string argument reason must be 11 or fewer characters, numbers, or spaces if option is not used. Otherwise, it must be 63 or fewer characters, numbers, or spaces. For example, the following are suggestions for use in reboot and shutdown procedures, respec- tively: writes a record, for each user currently logged in, to the file This program is invoked by runacct to close the existing file before creat- ing a new one. writes a record, for each user currently logged in, to the file This program is invoked by runacct to initialize the newly created file. FILES
Holds all accounting commands listed in section(1M) of this manual. Current process accounting file. Used for converting login name to user ID Login/logoff history file. New login/logoff history database. SEE ALSO
acctcms(1M), acctcom(1M), acctcon(1M), acctmerg(1M), acctprc(1M), acctsh(1M), diskusg(1M), fwtmp(1M), runacct(1M), acct(2), acct(4), utmp(4). utmps(4), wtmps(4). STANDARDS CONFORMANCE
acct(1M)
All times are GMT -4. The time now is 12:41 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy