Search Results

Search: Posts Made By: kumaar1986
10,739
Posted By Scrutinizer
Instead of a goto you could use something like...
Instead of a goto you could use something like this:
start() {
.....
}

while :
do
rval=`start`
if [ "$rval" -eq 4 ]
then
echo if condition true
sqlplus -l scott/tiger <<EOF...
4,434
Posted By Scrutinizer
For all these patterns it would need to be tested...
For all these patterns it would need to be tested if a file exists, for example when only moving the files:
for file in abc* ghi* xyz*
do
if [ -f "$file" ]; then
case $file in
abc*)...
4,434
Posted By in2nix4life
Just reverse what you have: ...
Just reverse what you have:


testval="${file#${file%%???}}"


# works at the front of the string
% works at the end of the string
4,434
Posted By rbatte1
greet_sed, you will notice that kumaar1986 is in...
greet_sed, you will notice that kumaar1986 is in the Bourne Shell, so your statement is not valid.

As a demo with my version (and using a case statement to neaten the options):-$ ls ...
4,434
Posted By greet_sed
Tested code and it works . ls -a. .. ...
Tested code and it works .

ls -a. .. abc12_0001_0001 abc13_0001_0002 abc14_0001_0003 ghi12_0001_0001 ghi13_0001_0002 ghi14_0001_0003 xyz12_0001_0001.xml xyz13_0001_0002.xml ...
Showing results 1 to 5 of 5

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