Search Results

Search: Posts Made By: ajincoep
18,388
Posted By ctsgnb
press escape to switch in command mode then ...
press escape to switch in command mode then

:45,66s/toto/titi/g

will replace toto by titi from line 45 to line 66
g = in a global manner (if toto appear more than once in a line, it get...
1,395
Posted By Klashxx
You can use typset to force uppercase (or...
You can use typset to force uppercase (or lowercase):

#typeset -u var
#var=yes
#echo $var
YES
10,074
Posted By Scott
Hi. This behaviour is described in the...
Hi.

This behaviour is described in the below link:

IBM - Setting into a view from a shell script does not process the remaining commands in the script...
9,209
Posted By Scrutinizer
Or alter zaxxon's idea ;) ...
Or alter zaxxon's idea ;)
var="driver=c:\folder1\folder2"
var2=${var#driver=}
echo $var2
c:\folder1\folder2
9,209
Posted By zaxxon
Not sure if I understand but I would alter...
Not sure if I understand but I would alter Scott's line then and add a pattern:

var2=$(echo $var | awk -F= '/driver=/ {print $2}')
29,032
Posted By Scrutinizer
They can be nested actually, but the inner...
They can be nested actually, but the inner backticks will need to be escaped...
A=`echo "\`ls\`"`; echo "$A"
which can make it difficult to understand. I much prefer the $() construct..
29,032
Posted By frans
The problem with the backquotes is that they...
The problem with the backquotes is that they can't be embedded ie:
A=$(echo "$(ls)"); echo "$A" # is OK
A=`echo "`ls`"`; echo "$A" # returns error
9,209
Posted By Scott
Ha! It's an awk question :D $>...
Ha!

It's an awk question :D


$> var2=$(echo $var | awk -F= '{print $2}')
9,209
Posted By zaxxon
$> var="driver=c:\folder1\folder2" $>...
$> var="driver=c:\folder1\folder2"
$> var2=${var#*=}
$> echo $var2
c:\folder1\folder2
Showing results 1 to 9 of 9

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