tags:

views:

208

answers:

2
+2  A: 

Short answer: not really

Longer answer: cut is intended for slicing up lines of text, it does that well. If you need a more complicated behavior, you'll need a text manipulation language. You have rejected the old time answers, so I'll recommend perl.


Any particular reason you don't want to use sed or awk?

dmckee
I'll add Python as an alternative, and mark this as a helpful answer.
Martin v. Löwis
Fair enough. I choose perl for two reasons: 1) I might be able to write a script without opening a book, and 2) I was miffed by the slight to awk. ::sniff::holds back tears:: There is certainly no reason you couldn't use tcl, ruby, guile...
dmckee
A: 

edit: I just wanted to know if it was possible without sed or awk, otherwise how would you do it with awk?

awk -F: '{print $2"."}'

SiegeX