Hi budies!
Really need some help (and sorry for my English, i'm come frome France),
I'm on ubuntu, bash.
I've got a file with a lot of names delimited with a ";" written like this:
Francois de france; Julien d'amerique; Emilie de Suede; gustave de Picardie;
It's very difficult to read it, cause i have hundreds of them.
I'm trying to sort them like this:
Francois de France;
Julien d'Amerique;
(...)
Gustave de Picardie;
So i tried to use the ";" as a delimiter and reading the arguments:
cut -d ";" -f 1-100 file.txt
It only give me my first style list in the terminal....I'm completly blocked...
Is there here a Linux Champion that can help me..?
Thanks all !!!
Cut, sort ?
Forum rules
Do not post support questions here. Before you post read the forum rules. Topics in this forum are automatically closed 6 months after creation.
Do not post support questions here. Before you post read the forum rules. Topics in this forum are automatically closed 6 months after creation.
Cut, sort ?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: Cut, sort ?
And as you are on Ubuntu, moving it here. Though that doesn't matter for the solution Try this:
Code: Select all
sed 's/;[^\n]/;\n/g' file.txt
Re: Cut, sort ?
Vince,
Your a f*ckin genius...!
I was completly blocked! Thanks a lot ! It works perfectly.
Zerozero,
Sorry for the doublon...i take care of this immediatly.
Thanks budies !
Your a f*ckin genius...!
I was completly blocked! Thanks a lot ! It works perfectly.
Zerozero,
Sorry for the doublon...i take care of this immediatly.
Thanks budies !