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 bash?
How to take input values from the user?
Explain about gui scripting?
What is computer cli?
How to calculate the number of passed arguments?
What is another name for a bash shell script that you might see?
What are the different methods available to run a shell script?
Write the syntax for "if" conditionals in linux?
What is the fastest scripting language?
Explain about sourcing commands?
There is a record with fields namely name,roll no.,salary,grade etc.Now,write a script to create a file with multiple records have same combination of fields but with unique roll numbers.The script should work for different names in the input file.
what is the meaning of First line of shell script ,what is meaning of #! pleas explain brifly