With a bash script I need to substitute, in a file, some spaces followed by ; with a single ;, or ; followed by some spaces with a single ;
I have a file like this
davide de marchi; hello; world ; again;
simon ; said; goodbye boys ;
I need to have this result
davide de marchi;hello;world;again;
simon;said;goodbye boys;
I tried a lot of different sed but it doesn’t work
thankyou
Show us what you have searched/tried
"s/ *; */;/g"
would work.♦
It work!!!!!! Thankyou very much!!!!!