How to handle the delimiter unit seperator in Unix
Answers were Sorted based on User's Feedback
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 |
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 |
What is sh in shell script?
Explain about gui scripting?
How do I run a .sh file?
How to print all array elements and their respective indexes?
If you have a string "one two three", which shell command would you use to extract the strings?
What are the different kinds of loops available in shell script?
What is the lifespan of a variable inside a shell script?
What does path stand for?
What is gui scripting?
Which scripting language is best for automation?
What is the difference between running a script as ./scriptname.sh and sh scriptname.sh
Is powershell a language?