Re: upper/lower case
| Newsgroups | gmane.editors.sed.user |
|---|---|
| Message-ID | <[email protected]> |
Perl-variant that skips line 1: perl -aF\; -pe'$F[2*($.>1)]=~s/(\w+)/\u\L$1/g;$_=join";",@F' input.txt Clearer, commented version: perl -aF\; -pe ' # split each line on \; next if $. == 1; # skip line 1 s/(\w+)/\u\L$1/g for $F[2]; # tcase(lcase) each word of field2 $_ = join ";", @F; # glue all fields back together again ' input.txt -- Ruud For debugging, try: s/(\w+)/[$1->\u\L$1]/g