How to remove last tags after the colon from these hashes?
I would like to know which is the easiest way on unix terminal to remove last tags in these hashes?
So I need only after the colon (blackstorm, desire123, azsxdcfvgbhn) Thank you in advance. $5$rounds=7500$cJNFD+6EuP8Gv6sD$LIPpiqULXUzH7yypeHQFSeGmO5QyPmSGuyx/3XiqW17:blackstorm $5$rounds=7500$I5Pzc1oB9WlbEdkI$is/LPDr.k6Orxp5Qc0gDDDb45IV5aYtfFDjIM7mTs8/:desire123 $5$rounds=7500$HQrhBBftG/qeSLoI$HhkdHN3eWi0e0Jv3vZsSjtA0vCWZzsceGCIt.oJGXOB:azsxdcfvgbhn |
What have you tried? If nothing, then I suggest searching the net, as here you are required to put in some effort.
|
Fairly easy command:
Code:
grep -o ':.*$' | cut -c 2- |
man awk.
|
Sed:
Code:
sed 's/.*://' Code:
awk -F: '{print $2}' Code:
cut -f2 -d":" |
Thank you very much.
|
All times are GMT -5. The time now is 07:06 PM. |