Search Results

Search: Posts Made By: kraljic
3,676
Posted By kraljic
Thank You max_hammer. tr worked for me # cut...
Thank You max_hammer. tr worked for me
# cut -d: -f2,4 test.txt | tr ':' '-'
myde-stiker

---------- Post updated at 07:32 AM ---------- Previous update was at 07:30 AM ----------

Thank you...
3,676
Posted By kraljic
It didn't work for me # echo...
It didn't work for me

# echo "hello:myde:temp:stiker" | cut -d: --output-delimiter='-' -f2,4
cut: illegal option -- output-delimiter=-
usage: cut -b list [-n] [filename ...]
cut -c list...
3,676
Posted By kraljic
Question on cut
Korn Shell

I have a file whose values are delimited using colon ( : )
$ cat test.txt
hello:myde:temp:stiker


$ cut -d: -f2,4 test.txt
myde:stikerI want field 2 and field 4 to be returned...
Showing results 1 to 3 of 3

 
All times are GMT -4. The time now is 05:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy