[X-Unix] Cron problem solved

Marley Graham mgraham at aquaflo.com
Wed Jun 29 09:10:11 PDT 2005


On Jun 27, 2005, at 12:49 AM, Robert Frank wrote:

> The $(...) actually starts a sub shell, then returns the result. In  
> the below fragment, you can simply write:
>
> for screen in mg*
> do
>   ...
> done
>
> provided you are in the directory with the screen shots when the  
> script starts, and file globbing is not turned off. There is no  
> need to run a subshell in order to get a list of files. The list is  
> automatically composed by simply using 'mg*'.


I don't know what globbing is, nor how to turn it off. But apparently  
that is what causes all files (not just the mg* files) to be  
converted when I modify my script as above. (?)


--------
Snip
--------
>
>> At the end of the day, I use ps2pdf to convert the files to pdf, so I
>> can view them as a series of screen shots in iMovie. I created the
>> following script which I run to do the conversion and remove the
>> original files:
>>
>> #!/bin/sh        #psconvert
>>
>> for screen in $(ls mg*)
>> do
>>          ps2pdf $screen
>> done
>> rm mg*[1-9]
>> exit
>>
>> which leaves a series of files like:
>>          mg103000.pdf
>>


More information about the X-Unix mailing list