Search Results

Search: Posts Made By: Zel2008
1,013
Posted By neutronscott
The definition of $! is "Expands to the process...
The definition of $! is "Expands to the process ID of the most recently executed background (asynchronous) command."

But since I assume your while loop runs after using MyProg without &, then...
10,344
Posted By clx
myVar=$((myVar+1)) #note that there is no $ sign...
myVar=$((myVar+1)) #note that there is no $ sign in myVar
myVar=`expr $myVar + 1` #note that there has to be $ sign in myVar
10,344
Posted By clx
That's the variable scoping. The loop runs in...
That's the variable scoping. The loop runs in subshell and hence they doesn't return the value back to the parent shell.

You can force everything to be executed in the current shell.


| {...
10,344
Posted By Aia
The while loop, in this case runs in another...
The while loop, in this case runs in another subshell with its own scope of variables, which are created and destroy as the while loop starts and finishes.

Some more...
1,578
Posted By edidataguy
There are different ways to achive this. Try...
There are different ways to achive this.
Try this for one:
$ MYBUILDPATH=/randomstuff/myBuildRoot/data_tables
$ echo $MYBUILDPATH | sed 's~data_tables[/]*$~~'

/randomstuff/myBuildRoot/
$...
Showing results 1 to 5 of 5

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