| Newsgroups |
gmane.editors.sed.user |
| Message-ID |
<[email protected]> |
Many thanks for all your answer.
Is it possible to pipe the awk result to a sed command ? (I read the man, looking on the net, but I find nothing)
For exemple, my filename is : a.csv
This file has 20 colums with ";" separator
I need to apply the command below on to the colum 3. (colum of my choice)
Something like that , but it does not work.
sed -i -r "s/(.*)/\L\1/; s/\<(.)/\u\1/g" | awk -F";" '{print $3}' a.csv
regards.
-----Message d'origine-----
De : [email protected] [mailto:[email protected]]
Envoyé : mercredi 9 décembre 2015 20:11
À : [email protected]
Objet : Re: upper/lower case
If helpful, here is Thierry's solution #1, for one column (the data you sent), the sed script just formatted a little differently.
$ cat input.txt
PAUL
JEAN-CHARLES
MARIE ODILE
$ sed -r "s/(.*)/\L\1/; s/\<(.)/\u\1/g" input.txt Paul Jean-Charles Marie Odile
For the case with multiple columns, if Thierry's solution #2 does not work, you might send an input file and desired output.
Daniel
On 12/9/2015 2:33 AM, MOKRANI Rachid [email protected] [sed-users]
wrote:
> Hi,
>
> I own a file with multiple columns, and in one column there are names which are all in uppercase.
>
> Example :
> PAUL
> JEAN-CHARLES
> MARIE ODILE
> ...
> ....
>
> I would like to get a result like.
> Paul
> Jean-Charles
> Marie Odile
>
> How to do that very simply with sed/awk easy to get this result?
>
>
> Many thanks for your suggestion.
> Regards.
> __________________________
> Avant d'imprimer, pensez à l'environnement ! Please consider the environment before printing !
> Ce message et toutes ses pièces jointes sont confidentiels et établis à l'intention exclusive de ses destinataires. Toute utilisation non conforme à sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse. IFP Energies nouvelles décline toute responsabilité au titre de ce message. This message and any attachments are confidential and intended solely for the addressees. Any unauthorised use or dissemination is prohibited. IFP Energies nouvelles should not be liable for this message.
> __________________________
>
>
> ------------------------------------
> Posted by: MOKRANI Rachid <[email protected]>
> ------------------------------------
>
------------------------------------
Posted by: Daniel Goldman <[email protected]>
------------------------------------
--
------------------------------------
Yahoo Groups Links
__________________________
Avant d'imprimer, pensez à l'environnement ! Please consider the environment before printing !
Ce message et toutes ses pièces jointes sont confidentiels et établis à l'intention exclusive de ses destinataires. Toute utilisation non conforme à sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse. IFP Energies nouvelles décline toute responsabilité au titre de ce message. This message and any attachments are confidential and intended solely for the addressees. Any unauthorised use or dissemination is prohibited. IFP Energies nouvelles should not be liable for this message.
__________________________