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 Path variable?What is its use?
write a shell script that accepts name from user and creates a directory by the path name, then creates a text file in that directory and stores in it, the data accepted from user till STOP, displays the no. of characters stored in the file.Program stops if directory name is null
HOW TO CREATE 10 USERS IN UNIX(HP-UX) USING SHELL SHELL SCRIPT?
How to get the 3rd element/column from each line from a file?
How do I run a .sh file?
What is "test"? How it is used in shell scripting?
What are the different communication commands available in the shell?
What is the difference between grep and egrep?
What is a boot block?
How do I run a shell script in powershell?
What language is used in terminal?
how to get part of string variable with echo command only?