Search Results

Search: Posts Made By: eightball
2,055
Posted By joeyg
Perhaps you need to show a bigger example of your...
Perhaps you need to show a bigger example of your input data?
$ echo "<h1> linux </h1>"
<h1> linux </h1>

$ echo "<h1> linux </h1>" | sed "s/linux/Linux/"
<h1> Linux </h1>
2,055
Posted By zaxxon
Why sed? $> echo "<h1> linux </h1>"| awk...
Why sed?


$> echo "<h1> linux </h1>"| awk '{$2=toupper($2); print}'
<h1> LINUX </h1>
2,055
Posted By glev2005
Do you need all letters uppercase or just the...
Do you need all letters uppercase or just the first one? If you can settle for just the first one, this will work: sed 's/<h1> \(.*\) <\/h1>/\u\1/'
2,055
Posted By ctsgnb
May require GNU sed (if wanting to use \u switch)
May require GNU sed (if wanting to use \u switch)
2,055
Posted By Skrynesaver
So very nearly ;) try the following: echo...
So very nearly ;) try the following:

echo '<h1> linux </h1>' | sed 's/\(<h1>\) *\([a-z]*\) \(<\/h1>\)/\1 \U\2\E \3/'
The \U uppercases the remaining text until it encounters a \L (lowercase...
Showing results 1 to 5 of 5

 
All times are GMT -4. The time now is 03:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy