How to handle the delimiter unit seperator in Unix

Answer Posted / srikanth

create script test.txt with | seperated

The below commands can be used to get the fields values:

awk -F"|" '{print $1}' test.txt

cat sri.txt | cut -d"|" -f1

Is This Answer Correct ?    4 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is bash eval?

744


What is @echo off?

755


Explain about login shell?

803


What is scripting autism?

907


what is tickets $ what low,medium,high priorite pls define time also

1919


How to calculate the number of passed arguments?

728


Write the syntax for "if" conditionals in linux?

796


Explain about sourcing commands?

816


What are scripts in psychology?

778


Is shell scripting a programming language?

793


What is the crontab?

730


How do you debug a script?

767


What language is bash?

640


What is shell variable?

690


What is bash used for?

753