Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How to handle the delimiter unit seperator in Unix

Answers were Sorted based on User's Feedback



How to handle the delimiter unit seperator in Unix..

Answer / 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

How to handle the delimiter unit seperator in Unix..

Answer / pitambar mishra

Different types of command using delimiter :
1. cut -d "|" -f6 emp.lst
d : delimiter or field separator
2. sort -t "|" -nk6 emp.lst
t : delimiter or field separator
3. awk -F "|" '{print $6}' emp.lst
F : delimiter or field separator

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More Shell Script Interview Questions

What is sh in shell script?

0 Answers  


Explain about gui scripting?

0 Answers  


How do I run a .sh file?

0 Answers  


How to print all array elements and their respective indexes?

0 Answers  


If you have a string "one two three", which shell command would you use to extract the strings?

5 Answers  


What are the different kinds of loops available in shell script?

3 Answers  


What is the lifespan of a variable inside a shell script?

0 Answers  


What does path stand for?

0 Answers  


What is gui scripting?

0 Answers  


Which scripting language is best for automation?

0 Answers  


What is the difference between running a script as ./scriptname.sh and sh scriptname.sh

1 Answers  


Is powershell a language?

0 Answers  


Categories