Search Results

Search: Posts Made By: juzt1s
1,866
Posted By ctsgnb
Here is a tricky example here is the code : ...
Here is a tricky example here is the code :
mytst(){
a=${1-whatever}
echo $a
}
Now let's run the code ...
If you understand every result, then you got how it works ...
# mytst
whatever
#...
1,866
Posted By ctsgnb
test if "$x" is not empty if [ -n "$x" ]; then ...
test if "$x" is not empty
if [ -n "$x" ]; then
...
else
...
fitest if "$x" is empty (has a length of zero) :
if [ -z "$x" ]; then
...
else
...
fi
or (if $x has a length of zero)

if [...
Showing results 1 to 2 of 2

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