Sponsored Content
Full Discussion: Searching comma's
Top Forums UNIX for Beginners Questions & Answers Searching comma's Post 303043333 by pranabpal on Friday 24th of January 2020 12:51:52 PM
Old 01-24-2020
Searching comma's

I have a delimited file. Each line consists of 5 fields separated by commas.so each line should consists of 4 commas. But due to some quality issue few lines consists of extra comma. need to print those odd lines.
need an unix command to find out those lines

Code:
100, Peter,12, 24 cromwell street, Mgr
101, Tom,12, 24 cardington square, Supervisor
103, Bob,12, 23 Beaver,cres, Steward


Last edited by Scrutinizer; 01-24-2020 at 03:36 PM.. Reason: code tags
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

comma

my input file(.txt) has the information like ------------------------------------- WS=123hi4 wd=WAST,RDP ------------------------------------ i need out like ---------------------------------- "where WS='123hi4' and wd in ('WAST','RDP')" (2 Replies)
Discussion started by: kms.sekar
2 Replies

2. Shell Programming and Scripting

Pull Data After Comma if 2 word before comma

Hi, I am trying to truncate word after comma in a file ONLY if there are already 2 words BEFORE comma. If there is one word or 3 or more words BEFORE comma, then I have to leave the data AS IS. See below for example. Input File : John Smith, Manager Smith, John Frank J F K... (2 Replies)
Discussion started by: msalam65
2 Replies

3. Shell Programming and Scripting

searching a file with a specified text without using conventional file searching commands

without using conventional file searching commands like find etc, is it possible to locate a file if i just know that the file that i'm searching for contains a particular text like "Hello world" or something? (5 Replies)
Discussion started by: arindamlive
5 Replies

4. Shell Programming and Scripting

How to grep after the first comma till the next comma in a line

Hi Can any one pls tell me how to grep this line POPULATION,69691,20120509 I want the number 69691 from the above line. How to grep from the first comma till the next comma. Thank You.:confused: (8 Replies)
Discussion started by: rxg
8 Replies

5. Shell Programming and Scripting

Substituting comma "," for dot "." in a specific column when comma"," is a delimiter

Hi, I'm dealing with an issue and losing a lot of hours figuring out how i would solve this. I have an input file which looks like this: ('BLABLA +200-GRS','Serviço ','TarifaçãoServiço','wap.bla.us.0000000121',2985,0,55,' de conversão em escada','Dia','Domingos') ('BLABLA +200-GRR','Serviço... (6 Replies)
Discussion started by: poliver
6 Replies

6. Shell Programming and Scripting

Need Help - comma inside double quote in comma separated csv,

Hello there, I have a comma separated csv , and all the text field is wrapped by double quote. Issue is some text field contain comma as well inside double quote. so it is difficult to process. Input in the csv file is , 1,234,"abc,12,gh","GH234TY",34 I need output like below,... (8 Replies)
Discussion started by: Uttam Maji
8 Replies

7. Shell Programming and Scripting

Replace comma and blank with comma and number

I, I have a file and i need to replace comma and blank space with comma and 0. cat file.txt a,5 b,1 c, d, e,4 I need the output as cat file.txt a,5 b,1 c,0 d,0 (4 Replies)
Discussion started by: jaituteja
4 Replies

8. Shell Programming and Scripting

Replace spaces with underscores up to first comma but not after the comma

I have a comma delimited file of major codes and descriptions. I want to replace all occurrences of spaces with underscores up to the first comma (only in the first field), but not replace spaces following the comma. For instance I have the following snippet of the file: EK ED,Elementary and... (7 Replies)
Discussion started by: tdouty
7 Replies

9. Shell Programming and Scripting

awk to parse comma separated field and removing comma in between number and double quotes

Hi Experts, Please support I have below data in file in comma seperated, but 4th column is containing comma in between numbers, bcz of which when i tried to parse the file the column 6th value(5049641141) is being removed from the file and value(222.82) in column 5 becoming value of column6. ... (3 Replies)
Discussion started by: as7951
3 Replies

10. UNIX for Beginners Questions & Answers

How to extract fields from a CSV i.e comma separated where some of the fields having comma as value?

can anyone help me!!!! How to I parse the CSV file file name : abc.csv (csv file) The above file containing data like abv,sfs,,hju,',',jkk wff,fst,,rgr,',',rgr ere,edf,erg,',',rgr,rgr I have a requirement like i have to extract different field and assign them into different... (4 Replies)
Discussion started by: J.Jena
4 Replies
stl_key(4)						     Kernel Interfaces Manual							stl_key(4)

NAME
stl_key - setld kit manufacturing key files DESCRIPTION
Each software product that is distributed as subsets for the setld(8) command has an associated key file. The key file's name consists of the product's unique 3-letter name and a 3-digit version number with the string .k for a suffix. The key file is used by the software kit- ting program kits(1) in producing software distribution packages. A key file has a global data section and a subset descriptor section. The sections are separated by a line containing only two percent signs (%%). The global section specifies the product-level attributes of the product. In this section, lines that begin with number signs (#) are com- ments and are ignored by the kits utility. Attributes are specified as name/value pairs separated by equals signs (=). There must be no white space surrounding the equals sign. There are four mandatory attributes and two optional attributes. Attributes must have non-null values. The attributes are: NAME Mandatory. Specifies the name of the product. The value for NAME is a text string of up to 40 characters. If the string con- tains blank spaces, it must be enclosed in apostrophes (''). CODE Mandatory. Specifies the 3-character product code for the product, for example, OAT. VERS Mandatory. Specifies the 3-digit version code for the product, for example, 100. MI Mandatory. Specifies the pathname of the master inventory file for the product. ROOT Optional. A single-digit integer that is set to 1 if the product is the base operating system. In all other cases, this flag must be a zero (0). If missing, this attribute defaults to zero. COMPRESS Optional. A single-digit integer that is set to 1 to create compressed subset files using the compress(1) utility, thereby sav- ing space on the distribution media. To suppress compression, this attribute is a zero (0). If missing, this attribute defaults to zero. The subset descriptor section contains one subset descriptor line for each subset in the product. Comments are not permitted in this sec- tion. A subset descriptor contains subset-specific attributes in four fields separated by TAB characters. These fields are: Subset name A character string up to 15 characters in length, composed of the 3-letter product code (for example, OAT), a mnemonic iden- tifying the subset (for example, DCB), and the 3-digit version code (for example, 100). All letters in the subset name must be uppercase. Reserved This field must be a single period. Flags A 16-bit unsigned integer Bit 0 is the ``sticky bit,'' indicating when set that the subset cannot be removed. Bit 1 indicates when set that the subset is optional. Bits 2 to 7 are reserved. Bits 8 to 15 are undefined. Description A short description of the subset, delimited by single quotation marks (''); for example, 'Document Building Tools' The subset descriptors must be listed in the order in which the subsets are to be installed by setld. RESTRICTIONS
Comments in the subset descriptor section will cause serious problems when encountered by the kits program. TAB formatting in the subset descriptors is tightly enforced by the kits program. EXAMPLES
The following example illustrates the key file for a hypothetical product kit: # Key file for the Orpheus Document Building Tools kit # # Product-level attributes. # NAME='Orpheus Authoring Tools' CODE=OAT VERS=100 MI=OAT00.mi ROOT=0 COMPRESS=1 # # Subset def- initions follow. # %% OATDCB100 . 0 'Document Building Tools' OATDCBDOC100 . 2 'Document Tools Documenta- tion' RELATED INFORMATION
Commands: kits(1), setld(8) Files: stl_comp(4), stl_ctrl(4), stl_image(4), stl_mi(4) Documents: Guide to Preparing Product Kits delim off stl_key(4)
All times are GMT -4. The time now is 06:26 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy