1 |
On 15 sept. 2010, at 16:46, Al wrote: |
2 |
|
3 |
> The first doesn't exist, hence the error. The second is found as python2.6.exe |
4 |
|
5 |
Oh ok, I thought they both co-existed, nvm. |
6 |
|
7 |
> What I really want to code is: |
8 |
> |
9 |
> Find python2.? with or without the .exe suffix! |
10 |
|
11 |
Well it's easy using chained commands, but a single bash expansion will fail as some point as you seen and make the whole command fail. |
12 |
|
13 |
Something like this maybe : |
14 |
|
15 |
if [ -f python2.? ] ; then |
16 |
echo "python2.6 stuff" |
17 |
elif [ -f python2.?.exe ] ; then |
18 |
echo "in python2.6.exe stuff" |
19 |
else |
20 |
echo "error ?" |
21 |
fi |
22 |
|
23 |
----- |
24 |
Florian. |
25 |
/ For security reasons, all text in this mail |
26 |
is double-rot13 encrypted. / |