Hi
I have a file which have say about 100,000 records..
the records in it look like
Some kind of text 1234567891 abcd February 14, 2008 03:58:54 AM lmnop
This is how it looks.. if u notice there is a 2byte space between each column.. and im planning to replace that with '|' ..
... (11 Replies)
Hello All,
I have a file with thousands of records:
eg:
|000222|123456987|||||||AARONSON| JOHN P|||PRIMARY |P
|000111|567894521|||||||ATHENS| WILLIAM k|||AAAA|L
Expected:
|000222|123456987|||||||AARONSON| JOHN |P|||PRIMARY |P
|000111|567894521|||||||ATHENS| WILLIAM |k|||AAAA|L
I... (6 Replies)
I am trying to extract 'postmaster' from the following string:
PenaltyError:=554 5.7.1 Error, send your mail to postmaster@LOCALDOMAIN
using the following command:
cat /usr/share/assp/assp.cfg | grep ^PenaltyError:= | cut -d '@' -f1 | cut -f8
but it returns:
PenaltyError:=554 5.7.1 Error,... (10 Replies)
Hello,
Is there a direct command to check if the delimiter in your file is a tab or a space? And how can they be converted from one to another.
Thanks,
G (4 Replies)
I have a csv file and there is a problem which I need to resolve.
Column1,Column2,Colum3,Column4
,x,y,z
,d,c,v
t,l,m,n
,h,s,k
,k,,y
z,j, ,p
Now if you see column1 for row 1 and row 4 though they are null there is a space but in case of row2 and row 5 there is no space.
I want row... (3 Replies)
I have more than 1000 files to parse. Each file contains few lines (number of lines varies) followed by a header line having all column's name (SPOT, NAME etc) and then values for those columns.
**Example File:
sdgafh
dfhaadfha
sfgaf dhah jkthdj
SPOT NAME GENE_NAME CH_MEAN CHDN_MED ... (11 Replies)
not sure if i'm doing this right i'm new tho this but i'm trying to use a space as a delimiter with the cut command
my code is
size=$( du -k -S -s /home/cmik | cut -d' ' -f1 )
i've also tried -f2 and switching the -d and -f around if that does anything (3 Replies)
Hi there,
After lots of reading I figured out how to use sed to parse my file.
This file is called services.txt:
00a1:ffff0000:0018:01f4:1:477
BravaNL
00a2:ffff0000:0018:01f4:1:471
MAX
00a3:ffff0000:000b:01f4:1:390
HaberTürk... (5 Replies)
Hi ,
Please suggest me how do I use : (colon and one space) as a delimiter in awk
Best regards,
Vishal (2 Replies)
Discussion started by: Vishal_dba
2 Replies
LEARN ABOUT OPENSOLARIS
fmlcut
fmlcut(1F) FMLI Commands fmlcut(1F)NAME
fmlcut - cut out selected fields of each line of a file
SYNOPSIS
fmlcut -clist [filename]...
fmlcut -flist [-dchar] [-s] [filename]...
DESCRIPTION
The fmlcut function cuts out columns from a table or fields from each line in filename; in database parlance, it implements the projection
of a relation. fmlcut can be used as a filter; if filename is not specified or is -, the standard input is read. list specifies the fields
to be selected. Fields can be fixed length (character positions) or variable length (separated by a field delimiter character), depending
on whether -c or -f is specified.
Note: Either the -c or the -f option must be specified.
OPTIONS
list A comma-separated list of integer field numbers (in increasing order), with optional - to indicate ranges. For example: 1,4,7;
1-3,8; -5,10 (short for 1-5,10); or 3- (short for third through last field).
-clist If -c is specified, list specifies character positions (for instance, -c1-72 would pass the first 72 characters of each line).
Note: No space intervenes between -c and list.
-flist If -f is specified, list is a list of fields assumed to be separated in the file by the default delimiter character, TAB, or by
char if the -d option is specified. For example, -f1,7 copies the first and seventh field only. Lines with no delimiter charac-
ters are passed through intact (useful for table subheadings), unless -s is specified. Note: No space intervenes between -f and
list. The following options can be used if you have specified -f.
-dchar If -d is specified, char is the field delimiter. Space or other characters with special meaning to FMLI must be quoted.
Note: No space intervenes between -d and char . The default field delimiter is TAB.
-s Suppresses lines with no delimiter characters. If -s is not specified, lines with no delimiters will be passed through
untouched.
EXAMPLES
Example 1 Getting login IDs and names
The following example gets the login IDs and names.
example% fmlcut -d: -f1,5 /etc/passwd
Example 2 Getting the current login name
The next example gets the current login name.
example% `who am i | fmlcut -f1 -d" "`
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
SEE ALSO fmlgrep(1F), attributes(5)DIAGNOSTICS
fmlcut returns the following exit values:
0 when the selected field is successfully cut out
2 on syntax errors
The following error messages may be displayed on the FMLI message line:
ERROR: line too long
A line has more than 1023 characters or fields, or there is no new-line character.
ERROR: bad list for c/f option
Missing -c or -f option or incorrectly specified list. No error occurs if a line has fewer fields than the list calls for.
ERROR: no fields
The list is empty.
ERROR: no delimiter
Missing char on -d option.
NOTES
fmlcut cannot correctly process lines longer than 1023 characters, or lines with no newline character.
SunOS 5.11 5 Jul 1990 fmlcut(1F)