Xavier Noria
1/11/2008 4:08:00 PM
On Jan 11, 2008, at 5:00 PM, jackster the jackle wrote:
> Xavier Noria wrote:
>> You mean something like this?
>>
>> $ for x in 1 2 3 4; do echo $x; done
>> 1
>> 2
>> 3
>> 4
>>
>> -- fxn
>
> Not exactly Xavier. I have a file (/usr/bin/snmp_poller.rb), when it
> runs, it polls a network device and stores the SNMP data in the DB. I
> currently have this running in CRON every minute. Without putting a
> loop
> in my snmp_poller.rb code, I want to somehow tell CRON using a ruby
> command line option, to run snmp_poller.rb 4 times.
>
> I know there are a lot of command line, one liners to run ruby code
> and
> I was hoping someone had one to do this.
Hmmm, but how is that different from chaging echo $x with your script?
No trying to push that shell loop, just trying to understand the goal.
-- fxn