|
Home > Archive > Unix administration > February 2004 > tr question
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| Dan R. Hafalia 2004-02-05, 7:34 pm |
| I'm trying to make this captured log entry,,,,
13:28:30: Starting CALC ...
13:29:12: Finished CALC ...
into this single line,,,,
13:28:30: Starting CALC ...13:29:12: Finished CALC ...
using "tr" with no success.
any suggestion will be much appeciated,
thanks,
-dan
| |
| Uli Wachowitz 2004-02-05, 8:34 pm |
| "Dan R. Hafalia" <dhafalia@ccsf.edu> wrote:
> 13:28:30: Starting CALC ...
> 13:29:12: Finished CALC ...
>
>
> into this single line,,,,
> 13:28:30: Starting CALC ...13:29:12: Finished CALC ...
>
> using "tr" with no success.
have you tried 'tr [:cntrl:] -d'?
| |
| Jeff Schwab 2004-02-05, 11:34 pm |
| Dan R. Hafalia wrote:
> I'm trying to make this captured log entry,,,,
>
> 13:28:30: Starting CALC ...
> 13:29:12: Finished CALC ...
>
>
> into this single line,,,,
> 13:28:30: Starting CALC ...13:29:12: Finished CALC ...
>
> using "tr" with no success.
>
> any suggestion will be much appeciated,
> thanks,
> -dan
Here's the code to do that in vi. I've indented it nicely for you.
J
Assuming the next two lines are similar, so you need to skip a line
before doing this again, try this:
jJ
Alternatively, try typing this at your shell prompt:
perl -pe 'chomp if ++$a%2' $path
Good luck.
|
|
|
|
|