Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Command line / script option to filter a data set by values of one column Post 302666191 by itkamaraj on Wednesday 4th of July 2012 01:29:03 AM
Old 07-04-2012
Code:
awk '{file="data"$1".txt";print $0 > file}' data.txt

use code tag for posting the data and scripts

https://www.unix.com/how-post-unix-li...code-tags.html
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to change values in certain column only in every line (any script)

Let say in a file I have lines of data like this : 13;2073;461496;15075341;3;001f7d3a;2042063674; 13;2074;461446;15080241;6;001ed33a;2042020154; 13;2075;461401;15085270;6;001f593b;2042054459; 13;2076;461381;15087160;6;001f7483;2042061443; 13;2077;461419;15083419;6;001eca1a;2042017818; I... (3 Replies)
Discussion started by: luna_soleil
3 Replies

2. UNIX for Dummies Questions & Answers

What is a menu or command line option driven script?

i'm confused what this means. i was asked to design a menu or command line option driven script that reads out of a DB and displays info such as read_data.pl -u <user> -e <event> which would print commands run by <user>with the <event> in the db. any suggestions? i've been using... (2 Replies)
Discussion started by: kpddong
2 Replies

3. Shell Programming and Scripting

perl script command line option driven script

could someone show me a sample command line option driven script? i want to see an easy way to write one and how i can execute it using command line options such as typing in read.pl -i <id> -c <cmds> -s <start> -e <end> would read out all the commands run by ID . from start time to... (7 Replies)
Discussion started by: kpddong
7 Replies

4. Programming

Reading command line arguments and setting up values if option not provided

I have a C++ program. I read command line arguments, but if the value is not supplied, I default or make a calculation. Let's say I set it to a default value. I can code this in several ways. Here I show three ways. What would be the best way for maintaining this code? The program will get very... (2 Replies)
Discussion started by: kristinu
2 Replies

5. Shell Programming and Scripting

awk : Filter a set of data to parse header line and last field of multiple same match.

Hi Experts, I have a data with multiple entry , I want to filter PKG= & the last column "00060110" or "00088150" in the output file: ############################################################################################### PKG= P8SDB :: VGS = vgP8SOra vgP8SDB1 vgP8S001... (5 Replies)
Discussion started by: rveri
5 Replies

6. Shell Programming and Scripting

Script for extracting data from csv file based on column values.

Hi all, I am new to shell script.I need your help to write a shell script. I need to write a shell script to extract data from a .csv file where columns are ',' separated. The file has 5 columns having values say column 1,column 2.....column 5 as below along with their valuesm.... (3 Replies)
Discussion started by: Vivekit82
3 Replies

7. Linux

Filter a .CSV file based on the 5th column values

I have a .CSV file with the below format: "column 1","column 2","column 3","column 4","column 5","column 6","column 7","column 8","column 9","column 10 "12310","42324564756","a simple string with a , comma","string with or, without commas","string 1","USD","12","70%","08/01/2013",""... (2 Replies)
Discussion started by: dhruuv369
2 Replies

8. Shell Programming and Scripting

awk to filter out lines containing unique values in a specified column

Hi, I have multiple files that each contain four columns of strings: File1: Code: 123 abc gfh 273 456 ddff jfh 837 789 ghi u4u 395 File2: Code: 123 abc dd fu 456 def 457 nd 891 384 djh 783 I want to compare the strings in Column 1 of File 1 with each other file and Print in... (3 Replies)
Discussion started by: owwow14
3 Replies

9. Shell Programming and Scripting

UNIX command -Filter rows in fixed width file based on column values

Hi All, I am trying to select the rows in a fixed width file based on values in the columns. I want to select only the rows if column position 3-4 has the value AB I am using cut command to get the column values. Is it possible to check if cut -c3-4 = AB is true then select only that... (2 Replies)
Discussion started by: ashok.k
2 Replies

10. Shell Programming and Scripting

Filter file to remove duplicate values in first column

Hello, I have a script that is generating a tab delimited output file. num Name PCA_A1 PCA_A2 PCA_A3 0 compound_00 -3.5054 -1.1207 -2.4372 1 compound_01 -2.2641 0.4287 -1.6120 3 compound_03 -1.3053 1.8495 ... (3 Replies)
Discussion started by: LMHmedchem
3 Replies
html2pdbtxt(1)						      General Commands Manual						    html2pdbtxt(1)

NAME
html2pdbtxt - HTML to Doc Text converter for Palm Pilots SYNOPSIS
html2pdbtxt [ -bchars ] [ -ttitle ] [ -uURL ] file.html [ file.txt ] html2pdbtxt -v DESCRIPTION
html2pdbtxt converts HTML to text suitable for conversion to a Doc(4) file via txt2pdbdoc(1). If no text filename is given, the generated text is sent to standard output. HTML Tags The following HTML tags (and corresponding ending tags) are recognized: ADDRESS, A NAME, BLOCKQUOTE, BR, CENTER, DIV, DL, DT, H1, H2, H3, H4, H5, H6, OL, OPTION, PRE, P, SELECT, SCRIPT, STYLE, TABLE, TITLE, UL. In all cases, the most ``reasonable'' thing is done given the constraints of the Doc(4) format which is essentially plain text. ALT attributes (typically found in IMG tags) have their text extracted and placed between brackets [like this]. All other HTML tags are stripped. Character Entities Both HTML character and numeric (decimal and hexadecimal) entity references are converted to their byte value according to the ISO 8859-1 (Latin 1) character set so they appear properly on the Pilot. For example, ``r&eacute;sum&#233;'' becomes ``resume'' with accented letter 'e's. Document Title Unless specified with the -t option, the HTML file is scanned for <TITLE> ... </TITLE> tags and, if found, the title is extracted and put on line 1 of the generated file. Bookmarks Bookmarks are placed into the generated file wherever <A NAME="..."> tags are found in the HTML file. OPTIONS
-bchars Specify the character sequence that is to serve as the bookmark indicator. The default is (*). (See the CAVEATS.) -ttitle Specify the title of the document that is to appear on line 1 of the generated file overriding any title found inside the HTML file between <TITLE> ... </TITLE> tags. -uurl Specify the URL the HTML file supposedly came from and put it on the line after the title, if any, in the generated file. -v Print the version number to standard output and exit. EXAMPLE
To convert an HTML file to Doc: html2pdbtxt -u http://www.wonderland.org/ alice.html alice.txt txt2pdbdoc "`head -1 alice.txt`" alice.txt alice.pdb CAVEATS
1. Some Doc readers have a ``feature'' whereby, during the scan for bookmarks phase, they recognize the bookmark sequence of characters anywhere in the text and not just at the beginning of a line. 2. Some Doc readers do not allow the bookmark sequence to contain the > character since they interpret that as the sequence delimiter, e.g., <->> will be interpreted as the sequence being merely -. 3. Ordered lists (via the OL tag) are treated as unordered lists (like the UL tag) because it would greatly complicate the code since it would have to be parsed rather than simple substitutions being performed. SEE ALSO
pdbtxt2html(1), txt2pdbdoc(1), doc(4), pdb(4) International Standards Organization. ``ISO 8859-1: Information Processing -- 8-bit single-byte coded graphic character sets -- Part 1: Latin alphabet No. 1.'' 1987. World Wide Web Consortium. ``Character entity references in HTML 4.0.'' HTML 4.0 Specification, http://www.w3.org/ AUTHOR
Paul J. Lucas <pauljlucas@mac.com> html2pdbtxt January 21, 2005 html2pdbtxt(1)
All times are GMT -4. The time now is 11:25 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy