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 language is bash written in?
How does shell scripting work?
What are different types of shell?
How many prompts are available in a UNIX system?
How to change our default shell?
Calculate a real number calculation directly from the terminal and not any shell script.
What is shell company all about?
what is the difference between writing code in shell and editor?
is there any command to find user password?
write a shell script to check the failed jobs?
What is INODE?
write a shell script that counts a number of unique word contained in the file and print them in alphabetical order line by line?