01-14-2016
No, there is always one more fields than delimiters.
Between consecutive delimiters there is an empty field.
These 2 Users Gave Thanks to MadeInGermany For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I wanted to cut the feilds comming after % and After $ at one go
can we do some thing like this cut -f 2 -d "%|$" (But it doesnot work)
Input File
BWPG %TCPRP1 $SCSPR000
BWPH %TCPRP1 $SCSPR003
BWPI %TRTYUP ResourceDescription="IMPRIMANTE " $BWOPTY
BWPJ %ZOMBIE ... (4 Replies)
Discussion started by: pbsrinivas
4 Replies
2. Shell Programming and Scripting
I'm working on formatting some attendance data to meet a vendors requirements to upload to their system. With some help on the forums here, I have the data close. But they've since changed what they want.
The vendor wants me to submit three fields to them. Field 1 is the studentid field,... (4 Replies)
Discussion started by: axo959
4 Replies
3. Shell Programming and Scripting
I just discovered, to my dismay, the following part of the cut man page:
-f, --fields=LIST
select only these fields;
also print any line that contains no delimiter character, unless the -s option is specified
The -s option toggles the printing of lines with no delimiters.
In most... (3 Replies)
Discussion started by: chlorine
3 Replies
4. Shell Programming and Scripting
Hi All,
I am trying to cut to do a cut operation, but since there are seems to be more than one deltimiters in some occasion I am not able to get the exact field. Can you please provide an SED and AWK script for treating the source file in such a way that all consecutive delimiters are treated... (3 Replies)
Discussion started by: rakesh.su30
3 Replies
5. UNIX for Dummies Questions & Answers
I'm having bother getting both lines contained in a file to output as the same value.
A simple example:
john:123456:123:456:doe
john:123456:123:doe
cut -d: -f1,4 input file
john:456
john:doe ^ first line should be same as second.
trick one for me, i know why it's because of the... (4 Replies)
Discussion started by: landofus
4 Replies
6. Shell Programming and Scripting
Hi,
I have a input file which contains following data
0 1
0 2
0 3
0 4
0 8
0 9
0 11
1 1
1 2
1 6
1 7
1 8
1 9
2 1
2 11
2 12 (12 Replies)
Discussion started by: Ryan Kim
12 Replies
7. UNIX for Beginners Questions & Answers
I'm a complete beginner in UNIX (and not a computer science student either), just undergoing a tutoring course. Trying to replicate the instructions on my own I directed output of the ls listing command (lists all files of my home directory ) to My_dir.tsv file (see the screenshot) to make use of... (9 Replies)
Discussion started by: scrutinizerix
9 Replies
8. Shell Programming and Scripting
Hi All,
I have a file with a single row having the following text
ABC.ABC.ABC,Database,New123,DBNAME,F,ABC.ABC.ABC_APP,"@FUNCTION1("ENT1") ,@FUNCTION2("ENT2")",R,
I want an output in the following format
ABC.ABC.ABC DBNAME ABC.ABC.ABC_APP '@FUNCTION1("ENT1")... (3 Replies)
Discussion started by: dev.devil.1983
3 Replies
9. UNIX for Beginners Questions & Answers
I have a text file with many thousands of lines, a small sample of which looks like this:
InputFile:PS002,003 D -1 5 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 6 6 -1 -1 -1 -1 0 509 0
PS002,003 PSQ 0 1 7 18 1 0 -1 1 1 3 -1 -1 ... (5 Replies)
Discussion started by: jvoot
5 Replies
10. Shell Programming and Scripting
BASH : I have a very long list I am parsing through:
10/10/19... (5 Replies)
Discussion started by: jeffs42885
5 Replies