delimiters used in UNIX


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers delimiters used in UNIX
# 1  
Old 10-19-2012
delimiters used in UNIX

Can you point me to information on the different delimited in UNIX like colon, spaces and tabs?
# 2  
Old 10-19-2012
Hm..

There are no global field delimiter for all applications
And in many cases you cat set delimiter by hand
i.e.
Code:
# All string is "first" field. Becouse default delimiter is 'tab' character
$ echo "a F bcd eFfghi jkl Fmnop qFrstuv" | cut -f1,2
a F bcd eFfghi jkl Fmnop qFrstuv

#I set delimiter to 'space'
$ echo "a F bcd eFfghi jkl Fmnop qFrstuv" | cut -d' ' -f1,2
a F

#I set delimiter to 'F' letter'
$ echo "a F bcd eFfghi jkl Fmnop qFrstuv" | cut -dF -f1,2
a F bcd e

In awk default delimiter is whitespace sequences
etc.

There are many different delimiters in different programs: spaces, tabs, colons and semicolons, commas and dots, single on multi byte characters, sequences and regexp.
For every taste Smilie
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Cut between two delimiters, / and .

BASH : I have a very long list I am parsing through: 10/10/19... (5 Replies)
Discussion started by: jeffs42885
5 Replies

2. Shell Programming and Scripting

Delimiters with awk?

I have a file which is separated by delimiter "|", but the prob is one of my column do contain delimiter as description so how can i differentiate it? PS : the delmiter does have backslash coming before it, if occurring in column Annual|Beleagured|Desc|Denver... (2 Replies)
Discussion started by: nikhil jain
2 Replies

3. Shell Programming and Scripting

Replacing UNIX 1 byte delimiters to the pipe separator

Hi I am new to Unix Shell scripting have a requirement where I have to replace the "unix 1 byte delimiter" with the "pipe" separator and also remove any carriage returns and line feeds if any The Source File 4 QFH Jungle Hill 32-34 City Road London SE23 3UX the output should be ... (3 Replies)
Discussion started by: dJHa
3 Replies

4. Shell Programming and Scripting

Inserting Delimiters

Hi Team, I am trying to get the data in below format Jan 01 | 19:00:32 | xyz | abc | sometext | string however I am not sure of the total number strings which can come in the record hence i cant use something like below as it can end $6 or it can go further cat file| awk... (8 Replies)
Discussion started by: rakesh_411
8 Replies

5. Shell Programming and Scripting

Use two delimiters in awk

I have a file having lines like: 14: <a="b" val="c"/> 18: <a="x" val="d"/> 54: <a="b" val="c"/> 58: <a="x" val="e"/> I need to create a file with output: 14 d 54 e So basically, for every odd line I need 1st word if delimiter is ':' and for every even... (14 Replies)
Discussion started by: shekhar2010us
14 Replies

6. Shell Programming and Scripting

Delimiters in awk

Line from input file a : b : c " d " e " f : g : h " i " j " k " l output k b a Its taking 7th word when " is the delimiter, 2nd and 1st word when : is the delimiter and returning all in one line.... I am on solaris Thanks..... (1 Reply)
Discussion started by: shekhar2010us
1 Replies

7. Shell Programming and Scripting

Two delimiters with AWK

Hello, this thread is more about scripting style than a specific issue. I've to grep from a output some lines and from them obtain a specific entry delimited by < and >. This is my way : 1) grep -i user list | awk '{FS="<";print $NF}' | sed -e 's/>//g' 2) grep -i user list | cut -d","... (10 Replies)
Discussion started by: gogol_bordello
10 Replies

8. Shell Programming and Scripting

Problems with delimiters

Hello, I have data in a file something like this - UNB+UNOA:1+006415160:1+AR0000012360:ZZ+080701:0552+2++DELFOR++++T'UNH+2+DELFOR:D:97A:UN Here, the delimiters used are + , : and ' . I have a set of such files in which these delimiters vary from one file to another. I am developing a... (4 Replies)
Discussion started by: The Observer
4 Replies

9. Solaris

To extract everything between two delimiters

My input file looks like " @$SCRIPT/atp_asrmt_adj.sql $SCRIPT/dba2000.scr -s / @$SCRIPT/cim1005w.pls $SCRIPT/dba2000.scr -s / @$SCRIPT/cim1006w.pls start $SCRIPT/cim1020d.sql;^M spool $DATA/cim1021m.sql @$DATA/cim1021m.sql ! rm $DATA/cim1021m.sql spool $DATA/cim1021m.sql... (1 Reply)
Discussion started by: dowsed4u8
1 Replies

10. Shell Programming and Scripting

Delimiters missing

Hi I have a pipe-delimited file where I eventually need to replace a string stored on the 3th field on a specific record. This is how the file looks like: A|Mike|Lvl 1|... B|... A|Maria|Lvl 1|... C|... B|... A|Jimmy|Lvl 2|... C|... A|Carry|Lvl 0|... C|... B|... A|John|Lvl 8|...... (2 Replies)
Discussion started by: Indalecio
2 Replies
Login or Register to Ask a Question