![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 | |
|
Newbie
Join Date: Apr 2005
Posts: 4
Rep Power: 0
![]() |
syntax problems.
hi, i need some help trouble shoting some syntax problems,
in a normal terminal when i type ls !(*.zip) but when i try a simple script such as #!/bin/bash ls !(*.zip) Quote:
#!/bin/bash ls !(`*.zip`) so could anyone show me why its working differntly in the terminal and script and show me what would be the correct syntax? thanks |
|
|
|
|
|
|
#2 |
|
Programming Guru
![]() |
I only got this far before giving up...
This shows all the *.zip files (not all but *.zip)... #!/bin/bash CMD="*.zip" echo $CMD |
|
|
|
|
|
#3 |
|
Newbie
Join Date: Apr 2005
Posts: 4
Rep Power: 0
![]() |
i figured it out.
shopt extglob was set to off when running a script but was turned on when using the teriminal. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|