Sponsored Content
Full Discussion: Sort table ignoring header
Top Forums UNIX for Beginners Questions & Answers Sort table ignoring header Post 303046348 by RudiC on Friday 1st of May 2020 03:02:58 PM
Old 05-01-2020
Would this point you in the right direction to adapt your script?
This User Gave Thanks to RudiC For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

unix sort according to a header line

Hi, I have a file with a header line, followed by some contents. How can I sort the file according to header lines? eg. /* abcd_005*/ a bc /* abcd_001*/ d e /* abcd_002*/ x y desired output: /*abcd_001*/ (0 Replies)
Discussion started by: neil.0412
0 Replies

2. Shell Programming and Scripting

Simple sort with header

Hi, Please help with this problem. Somehow does not work for me. test.txt CHR SNP BP A1 C_A C_U A2 CHISQ P OR 19 rs10401969 19268718 C 222 890 T 0.03462 0.8524 0.9857 1 rs10873889 ... (4 Replies)
Discussion started by: genehunter
4 Replies

3. Linux

Top header says 50% free, but table shows 100% used

Hi, Can anyone explain this? top - 04:21:04 up 23 days, 2:35, 1 user, load average: 0.02, 0.02, 0.00 Tasks: 37 total, 1 running, 36 sleeping, 0 stopped, 0 zombie Cpu(s): 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 524288k total, 253084k used,... (1 Reply)
Discussion started by: varontron
1 Replies

4. Shell Programming and Scripting

How to Add Table with Header for Shell Output

I have a Script that generates 3 columns of the result. The line script is /usr/xpg4/bin/awk -F' ' '{print $1 /t $2}' File_Name | awk -F'>' '{print $2}' | cut -d'<' -f1 | sort -rn | uniq -c The output of the Command is : Code.500 4 Input Error Code.404 ... (4 Replies)
Discussion started by: raghunsi
4 Replies

5. UNIX for Dummies Questions & Answers

Merge all csv files in one folder considering only 1 header row and ignoring header of all others

Friends, I need help with the following in UNIX. Merge all csv files in one folder considering only 1 header row and ignoring header of all other files. FYI - All files are in same format and contains same headers. Thank you (4 Replies)
Discussion started by: Shiny_Roy
4 Replies

6. UNIX for Dummies Questions & Answers

Sort a tab file with header.

How to sort a tab delimited file first on col1 and then on col2. Also I need to keep the header intact. file.txt val1 val2 val3 val4 a b c d m n o p e f g h i j k l ... (3 Replies)
Discussion started by: mary271
3 Replies

7. Shell Programming and Scripting

Replace a column with a value by ignoring the header lines

i have a file in the gz format , the content of the file is as follow. gzcat f1.gz # 1.name # 2.location # 3.age # 4.dob . . . . . . . . . # 43.hobbies < Aravind,33,chennai,09091980, , , , , , , surfing> (5 Replies)
Discussion started by: aravindj80
5 Replies

8. UNIX for Dummies Questions & Answers

Sort a las file keep the header as it is

I have several las files with a header and each file start Version and text and before the data starts end up with ~Ascii, then the numbers starts: ------------------------------------------------------------------------- Code: ~Version .....text.... ~Ascii 2 abc 230 1 name 1 abc ... (1 Reply)
Discussion started by: tk2000
1 Replies

9. UNIX for Dummies Questions & Answers

Sort a las file keep the header as it is

I have several las files with a header and each file start Version and text and before the data starts end up with ~Ascii, then the numbers starts: ------------------------------------------------------------------------- ~Version .....text.... ~Ascii 2 abc 230 1 name 1 abc 400 1... (17 Replies)
Discussion started by: tk2000
17 Replies

10. Shell Programming and Scripting

Sort without Header and Trailer

Hi , My UNIX system is SUN Solaris. I am trying to do a simple thing as described below. I have a PIPE delimited file that has header and trailer. So the file is something like below: Test1.txt looks like something below: field_data1|field_data2|and some more data --Header ... (5 Replies)
Discussion started by: Saanvi1
5 Replies
WebService::CIA::Source::DBM(3pm)			User Contributed Perl Documentation			 WebService::CIA::Source::DBM(3pm)

NAME
WebService::CIA::Source::DBM - An interface to a DBM copy of the CIA World Factbook SYNOPSIS
use WebService::CIA::Source::DBM; my $source = WebService::CIA::Source::DBM->new({ DBM => 'factbook.dbm', Mode => 'read' }); DESCRIPTION
WebService::CIA::Source::DBM is an interface to a pre-compiled DBM copy of the CIA World Factbook. The module can also be used to make the DBM file, taking data from WebService::CIA::Parser (or WebService::CIA::Source::Web) and inserting it into a DBM. A script to do this - webservice-cia-makedbm.pl - should be included in this module's distribution. METHODS
Apart from "new", these methods are normally accessed via a WebService::CIA object. "new(\%opts)" This method creates a new WebService::CIA::Source::DBM object. It takes a hashref of options. Valid keys are "DBM" and "Mode". DBM is mandatory and should be the location of the DBM file to be used. Mode is optional and can be either "read" or "readwrite". It defaults to "read". "value($country_code, $field)" Retrieve a value from the DBM. $country_code should be the FIPS 10-4 country code as defined in <https://www.cia.gov/library/publications/the-world-factbook/appen- dix/appendix-d.html>. $field should be the name of the field whose value you want to retrieve, as defined in <https://www.cia.gov/library/publica- tions/the-world-factbook/docs/notesanddefs.html>. (WebService::CIA::Parser also creates four extra fields: "URL", "URL - Print", "URL - Flag", and "URL - Map" which are the URLs of the country's Factbook page, the printable version of that page, a GIF map of the coun- try, and a GIF flag of the country respectively.) "all($country_code)" Returns a hashref of field-value pairs for $country_code or an empty hashref if $country_code isn't in the DBM. "set($country_code, $data)" Insert or update data in the DBM. $country_code should be as described above. $data is a hashref of the data to store (as Field => Value). "set" overwrites any data already in the DBM under $country_code. "dbm()" Returns a reference to the DBM file in use. AUTHOR
Ian Malpass (ian-cpan@indecorous.com) COPYRIGHT
Copyright 2003-2007, Ian Malpass This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The CIA World Factbook's copyright information page (<https://www.cia.gov/library/publications/the-world-factbook/docs/contributor_copy- right.html>) states: The Factbook is in the public domain. Accordingly, it may be copied freely without permission of the Central Intelligence Agency (CIA). SEE ALSO
WebService::CIA, WebService::CIA::Parser, WebService::CIA::Source::Web perl v5.8.8 2008-02-04 WebService::CIA::Source::DBM(3pm)
All times are GMT -4. The time now is 03:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy