What is wrong with tiny (g)awk line ??


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting What is wrong with tiny (g)awk line ??
# 8  
Old 03-11-2012
By the way, since you were using gawk, GNU sed can do this:
Code:
sed 's/\b./\u&/g' infile

It does seem to work with Détente as does this perl:
Code:
perl -pe 's/\b[[:alpha:]]/\u$&/g' infile

and this GNU sed:
Code:
sed 's/\b[[:alpha:]]/\u&/g' infile


Last edited by Scrutinizer; 05-06-2012 at 03:02 AM..
# 9  
Old 03-11-2012
srutinizer your awk line doesn't work with d'Alpisme

---------- Post updated at 08:56 AM ---------- Previous update was at 08:53 AM ----------

it would be useful to the awk word match \w to create a Filed separator FS.
# 10  
Old 03-11-2012
Quote:
Originally Posted by louisJ
srutinizer your awk line doesn't work with d'Alpisme

---------- Post updated at 08:56 AM ---------- Previous update was at 08:53 AM ----------

it would be useful to the awk word match \w to create a Filed separator FS.
Correct that only works with space separation, but at that point it wasn't clear that you were going to transform French Smilie
This User Gave Thanks to Scrutinizer For This Post:
# 11  
Old 03-11-2012
Quote:
Originally Posted by louisJ
indeed, this must be it.

tip78 ...the problem is with accentuated words lire Détente....your pearl gives DéTente....
it's Perl not pearl
lol
Détente can be done too but i'm lazy for that
This User Gave Thanks to For This Post:
tip78
# 12  
Old 03-11-2012
Indeed i should have mentionner it earlier , sorry :-P ...
Login or Register to Ask a Question

Previous Thread | Next Thread

3 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

what's wrong with my awk line?

] && { echo "The free mem need to be more than 2G" } (3 Replies)
Discussion started by: yanglei_fage
3 Replies

2. Shell Programming and Scripting

what is wrong with this expr line

It keeps giving me expr syntax error. expr "${etherline }" : ’.*no match found’ 2>&1 >/dev/null Thanks in advance. (1 Reply)
Discussion started by: shadow_boi
1 Replies

3. Shell Programming and Scripting

what is wrong with this line?

system ("$ssh '$perf_stats' < temp_pipe 2>&1 &"); I need to start and interact with my executable defined by perf_stats on a remote machine but not change my command line to that of the remote machine. temp_pipe is a node created by mknod -f temp_pipe (6 Replies)
Discussion started by: looza
6 Replies
Login or Register to Ask a Question