Search Results

Search: Posts Made By: shivashankar_S
12,605
Posted By thegeek
if is a conditional statement not looping ! ...
if is a conditional statement not looping !

while, for are loop statements...
12,605
Posted By jayan_jay
Expecting this ..?? if [ condition1 ]; then ...
Expecting this ..??

if [ condition1 ]; then
export 1
elif [ conidtion2 ]; then
export 2
elif [ condition3 ]; then
export 3
else
export 4
fi
1,415
Posted By Skrynesaver
mirni's suggestion is fine if there won't be a...
mirni's suggestion is fine if there won't be a case where

ls siv*
siv4211 siv4215 siv4217
dir0=siv4216
...
1,415
Posted By mirni
Better yet, you could do: last_version=`ls -d...
Better yet, you could do:
last_version=`ls -d siv[0-9]* | sort -n | tail -n 1`

That is,

dir0=siv4210
dirNoVer=${dir0%%[0-9]*} #'siv'
dirLastVer=$(ls -d ${path}/${dirNoVer}[0-9]* | sort -n |...
1,415
Posted By Skrynesaver
Try this construct while [ ! -e $filename ]...
Try this construct

while [ ! -e $filename ] && [ $(( ${#filename} - 1 )) -ne 0 ]
do
filename=${filename:0:$(( ${#filename} - 1 ))}$(( ${filename:$(( ${#filename} - 1 )) } -1))
...
1,415
Posted By Skrynesaver
you don't need a for loop, you need a while loop,...
you don't need a for loop, you need a while loop, you should test for the existence [ -e $directory_name ] of the D3 value in the while loop, and if not decrement the value, as we don't have the...
1,415
Posted By clx
D3 is the actual name? If not, what are the rules...
D3 is the actual name? If not, what are the rules for this directory?
How many alpha bates? numbers? and upto which number you want check for the lower versions? like .. If not in D3, check D2, if...
1,113
Posted By kaboink
thing i learned with scripting is that you can...
thing i learned with scripting is that you can execute commands at prompt.
try to breakdown your code piece by piece and you'll see your output.
then change the syntax as desired.

if its too...
1,113
Posted By ygemici
this means if you script get lower than 10...
this means if you script get lower than 10 parameter then script echoes these
# ./script 1 2 3 4 5 6 # in this state , parameter count is 6 then return error messages..
# ./script 1 2 3 4 5 6...
Showing results 1 to 9 of 9

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