Sponsored Content
Top Forums Shell Programming and Scripting What is wrong with tiny (g)awk line ?? Post 302606396 by louisJ on Sunday 11th of March 2012 07:30:29 AM
Old 03-11-2012
[SOLVED] What is wrong with tiny (g)awk line ??

Hi
I wish to capitalize the first letter or every word in a text file with:
Code:
gawk '{$0=gensub(/(\w)(\w*)/,toupper("\\1")"\\2","g");}' file.txt

But it doesn't work...:
target:
bla test Test TEST
yes nO Yes yes
restult:
bla test Test TEST
yes nO Yes yes
any idea? thanks

Last edited by louisJ; 03-12-2012 at 06:58 AM..
 

3 More Discussions You Might Find Interesting

1. 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

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'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
SPECRB(1)																 SPECRB(1)

NAME
specrb - standalone test runner for test/spec and Test::Unit test suites SYNOPSIS
specrb [OPTIONS] [FILES | -a ] [-- untouched arguments] DESCRIPTION
The Ruby script specrb allows you to run tests written with test/spec from the command line. It can also be used for plain Test::Unit test suites. You can either specify the names of the test files you want to run, or let specrb find automatically all the tests in your project, by using the -a switch (see TEST/SPEC OPTIONS below). You can also use various options on the command line to pass parameters to the Ruby interpreterm or to modify the behavior of test/spec and/or test/unit. RUBY OPTIONS
-e, --eval LINE evaluate a LINE of code -d, --debug set debugging flags (set $DEBUG to true) -w, --warn turn warnings on for your script -I, --include PATH specify $LOAD_PATH (may be used more than once) -r, --require LIBRARY require the LIBRARY, before executing your script TEST
/SPEC OPTIONS: -s, --specdox do AgileDox-like output --rdox do AgileDox-like output with RDoc formatting -a, --automatic gather tests from ./test/, include ./lib/ TEST
::UNIT OPTIONS: -n, --name NAME runs tests matching regexp NAME -t, --testcase TESTCASE runs tests in TestCases matching regexp TESTCASE COMMON OPTIONS
: -h, --help show a message similar to this manpage --version show version AUTHORS
The test/spec library has been written by Christian Neukirchen <http://purl.org/net/chneukirchen>. This manual page, inspired by the help message of specrb, has been written for the Debian Project by Cedric Boutillier (but may used by others). 2012-06-26 SPECRB(1)
All times are GMT -4. The time now is 07:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy