Search Results

Search: Posts Made By: skerit
5,490
Posted By skerit
Ah, so that's what ^ and $ mean. I almost thought...
Ah, so that's what ^ and $ mean. I almost thought "^$" was *another* way of writin a newline character... Good to know!

sed "s/^[0-9]/~&/" < test | tr "\n" " " | tr "~" "\n" | awk '{print $1$2$3}'...
5,490
Posted By skerit
All the 3 scripts in 1 line, how cool ... ...
All the 3 scripts in 1 line, how cool ...

Anyway, it almost worked, except for this line:

7
,
Jurgen,4442

Which gets transformed to

7,Jurgen
4442
5,490
Posted By skerit
That's a nice workaround, but I'm afraid my...
That's a nice workaround, but I'm afraid my source file isn't always as pretty as I thought it was.

Sometimes there's an extra enter, sometimes there's a name which doesn't have another field...
5,490
Posted By skerit
Replacing \n,\n with ,
Hi everyone,

I've read lots of posts about tr and sed and such, I haven't been able to get out of this one.

I have a file, like this:


1
,
Jelle

2
,
SandraThe only thing it needs to...
Showing results 1 to 4 of 4

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