Hi All,
I've got some strange behaviour going on when trying to manipulate a file that contains spaces.
My input file looks something like this:
xxxxxxxxx,yyyy,sss sss sss,bbbbbbb
If I use awk:
When running from the command line I get:
sss sss sss
But when running from a... (7 Replies)
I'm building a file with sql delete statements. I need to print the single quotes for the where clause.
i.e.
delete from Command where CommandName = 'SomeName';
I have the following in my script
input=$(pwd)/Cmnd.csv
i=0
while read line
do
if test $i -ge 1;
then
... (2 Replies)
Hi,
I have written a code to modify a string say,
StringA=abc,def,ghi
I need to change it to something like:
StringB=This means abc='ABC', This mean def='DEF', This means ghi= 'GHI'
StringB=$(echo $StringA | awk -F',' 'BEGIN { OFS="," } { for (i=1; i<=NF;i++) $i="This means... (2 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'm working on a different stage of a project that someone helped me address elsewhere in these threads.
The .docs I'm cycling through look roughly like this:
1 of 26 DOCUMENTS
Copyright 2010 The Age Company Limited
All Rights Reserved
The Age (Melbourne, Australia)
November 27, 2010... (9 Replies)
Hi,
I have a bunch of records within a directory where each one has this form:
(example file1)
1 2 50 90 80 90 43512 98 0909 79869 -9 7878 33222 8787 9090 89898 7878 8989 7878 6767 89 89 78676 9898 000 7878 5656 5454 5454
and i want for all of these files to be... (3 Replies)
Hello to all,
Please some help on this. I have the file in format as below.
How can I set the record separator as the string below in red
"No. Time Source Destination Protocol Length Info"
I've tried code below but it doesn't seem to... (6 Replies)
Hi,
I'm using gawk to read a text file and count the sentences.
I want to use a record separator of a period, exclamation mark and a question mark.
The problem is that the file contains words like "Mr. Smith" so the periods in the appellation are tripping my record separator.
This is my... (12 Replies)
Discussion started by: 1Brajesh
12 Replies
LEARN ABOUT DEBIAN
dtfits
dtfits(1) General Commands Manual dtfits(1)NAME
dtfits - display FITS table
SYNOPSIS
dtfits <table>
DESCRIPTION
dtfits dumps the contents of a FITS table in an ASCII format, either into a user-specified file or on stdout. The output is formatted on a
fixed number of columns to make it readable by human beings. Additional informations are printed out before the table values are dumped,
these informations can be skipped by using the -d option.
Last, if you want to dump the table into an easily parsable format (for a piece of software), you might want to use the -s option which
specifies a character to use as separator. All data fields will be printed out separated by this character only. This allows to use string
parsers to cut down the output lines into tokens by looking for this separator. Fields (lines) will still be delimited by the end-of-line
character. This option produces ASCII tables which are easy to parse for a piece of software but mostly unreadable to human beings.
Notice that dtfits only accepts one single FITS table in input.
OPTIONS -d Skip information output about the table and column names. Outputs only the table values. Beware that if the FITS file contains sev-
eral extensions, they will all appear one after another, separated only by two blank lines. In that case, it would be preferrable to
keep the complete output and parse out the returned stream to differentiate which data come from where.
-s <char>
Use the character <char> as separator in output. This option is useful if you want to produce a table that should be parsed by a
piece of software (see above description). The separator can only be a single non-null character. To avoid special characters being
interpreted by the shell, it is recommended to provide this character always between simple or double quotes. Example:
dtfits -s '&' table.tfits
If you want to use a special character as separator, such as a tab, use ^V to insert your character, such as:
dtfits -s '^V<TAB>' table.tfits
which means: you type CTRL-V and then the tab key.
SEE ALSO
dfits
FILES
FITS tables are stored into extensions. If there are several tables in a file, they will all be displayed one after another in the same
output stream.
22 Dec 1999 dtfits(1)