Hello All,
I am using this in a bash script to toss incoming files here and am having a problem with it that I hope someone can shed some light on for me.
if [ -f fido/inbound/*.tic ]; then
there in just one inbound *.tic but if there are more than one tic to be processed it fails and I see this..
One last question.. I have a second section like the aboveeeee that looks for *.TIC instead of *.tic. Is there a way to edit the above line to look for both *.tic and *.TIC?
Yeah, the reason it would fail, is the shell will expand it. IE: If you have 2
TIC's "a.tic", "b.tic", the command expands to:
: if [ -f fido/inbound/a.tic fido/inbound/b.tic ]; then
Which is a syntax error. There are probably many ways to do this, the way I would do it is:
In my above example, you could have
for i in fido/inbound/*.tic fido/inbound/*.TIC; do
And then have another test for the uppercase *.TIC, that "continues".
| Sysop: | DaiTengu |
|---|---|
| Location: | Appleton, WI |
| Users: | 1,085 |
| Nodes: | 10 (0 / 10) |
| Uptime: | 141:14:41 |
| Calls: | 13,891 |
| Calls today: | 3 |
| Files: | 187,012 |
| D/L today: |
1,208 files (315M bytes) |
| Messages: | 2,452,369 |