Dear All,
I have a comma-separated file.
1. The first line of the file(header) should have 4 commas(5 fields).
2. The last line of the file should have 1 comma(2 fields).
Pls help me in checking this condition in a shell script.
And the number of lines between the first line and last... (11 Replies)
I have a csv file with lines like the followings
123456,"ABC CO., LTD","XXX"
789012,"DEF LIMITED", "XXX"
before I bcp this file to database, the comma in "CO.," need to be removed first.
My script is cat <filename> | sed 's/"CO.,"/"CO."/g'
but it doesn't work. Can anyone here able to... (2 Replies)
I have a situation where I am reading a text file line-by-line. Those lines of data contain comma separated fields of data. However, each line can vary in the number of fields it can contain. What I need to do is parse apart each line and write each field of data found (left to right) into a file.... (7 Replies)
Hi Friends,
I'm working on a perl script, which seems to be simpler. But I'm very new to PERL scripting.
I have a comma separated data file, from which I need to extract only the seventh field data out of available twenty fields to an array using perl.
Any help would be much appreciated.
... (17 Replies)
Guys,
Need you help, i have a a file content that look like this.
Nokia 3330 <spaces><spaces><more spaces>+76451883874
Nokia 3610 +87467361615
so on and so forth,
- there are so many spaces in between.
- e.g.... (5 Replies)
I have a list of files with the same name, but they have a different date stamp in the name. I can find the first file, but I need to find the second file. I am using this information to create a variable I use later. Here is a example of how I find the first file.
"ls -mr... (11 Replies)
Hi, all
I need to get fields in a line that are separated by commas, some of the fields are enclosed with double quotes, and they are supposed to be treated as a single field even if there are commas inside the quotes.
sample input:
for this line, 5 fields are supposed to be extracted, they... (8 Replies)
I need to arrange output of SQL query into a comma separated format and I'm struggling with processing the output...
The output is something like this:
<Attribute1 name><x amount of white spaces><Atribute value>
<Attribute2 name><x amount of white spaces><Atribute value>
<Attribute3... (2 Replies)
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)
I am trying to re-format a .csv file using awk. I have 6 fields in the .csv file. Some of the fields are enclosed in double quotes and contain comma's inside the quotes. awk is breaking this into multiple fields.
Sample lines from the .csv file:
Device Name,Personnel,Date,Solution... (1 Reply)
Discussion started by: jxrst
1 Replies
LEARN ABOUT DEBIAN
funcombine
funcombine(7) SAORD Documentation funcombine(7)NAME
FunCombine - Combining Region and Table Filters
SYNOPSIS
This document discusses the conventions for combining region and table filters, especially with regards to the comma operator.
DESCRIPTION
Comma Conventions
Filter specifications consist of a series of boolean expressions, separated by commas. These expressions can be table filters, spatial
region filters, or combinations thereof. Unfortunately, common usage requires that the comma operator must act differently in different
situations. Therefore, while its use is intuitive in most cases, commas can be a source of confusion.
According to long-standing usage in IRAF, when a comma separates two table filters, it takes on the meaning of a boolean and. Thus:
foo.fits[pha==1,pi==2]
is equivalent to:
foo.fits[pha==1 && pi==2]
When a comma separates two spatial region filters, however, it has traditionally taken on the meaning of a boolean or. Thus:
foo.fits[circle(10,10,3),ellipse(20,20,8,5)]
is equivalent to:
foo.fits[circle(10,10,3) || ellipse(20,20,8,5)]
(except that in the former case, each region is given a unique id in programs such as funcnts).
Region and table filters can be combined:
foo.fits[circle(10,10,3),pi=1:5]
or even:
foo.fits[pha==1&&circle(10,10,3),pi==2&&ellipse(20,20,8,5)]
In these cases, it is not obvious whether the command should utilize an or or and operator. We therefore arbitrarily chose to implement the
following rule:
o if both expressions contain a region, the operator used is or.
o if one (or both) expression(s) does not contain a region, the operator used is and.
This rule handles the cases of pure regions and pure column filters properly. It unambiguously assigns the boolean and to all mixed cases.
Thus:
foo.fits[circle(10,10,3),pi=1:5]
and
foo.fits[pi=1:5,circle(10,10,3)]
both are equivalent to:
foo.fits[circle(10,10,3) && pi=1:5]
[NB: This arbitrary rule replaces the previous arbitrary rule (pre-funtools 1.2.3) which stated:
o if the 2nd expression contains a region, the operator used is or.
o if the 2nd expression does not contain a region, the operator used is and.
In that scenario, the or operator was implied by:
pha==4,circle 5 5 1
while the and operator was implied by
circle 5 5 1,pha==4
Experience showed that this non-commutative treatment of the comma operator was confusing and led to unexpected results.]
The comma rule must be considered provisional: comments and complaints are welcome to help clarify the matter. Better still, we recommend
that the comma operator be avoided in such cases in favor of an explicit boolean operator.
SEE ALSO
See funtools(7) for a list of Funtools help pages
version 1.4.2 January 2, 2008 funcombine(7)