Re: /bin/date and coreutils

2007-05-18 Thread N_Ox
Just a side note: as stated in sed(1) and gnused(1) manpages, I'm pretty sure sed -E is the same as gnused -r. N_Ox. Le 7 mai 07 à 20:52, David Liontooth a écrit : In the case of sed, I needed the -r switch and found gsed, providing gnused, in macports, which works great. Dave

Re: scripting environments (was: /bin/date and coreutils)

2007-05-11 Thread Vincent Lefevre
On 2007-05-11 00:27:54 +0200, Jochen Küpper wrote: On 10.05.2007, at 23:56, Vincent Lefevre wrote: And Python isn't installed everywhere. Well, that's not my experience. It's even on all number crunchers and big iron machines I have used over the last years, as scheduling/batch systems

Re: scripting environments (was: /bin/date and coreutils)

2007-05-11 Thread Vincent Lefevre
On 2007-05-11 18:12:35 +0200, Elias Pipping wrote: On May 11, 2007, at 9:13 AM, Vincent Lefevre wrote: They are always there under Mac OS X. But some Unix platforms do not necessarily have a /bin/bash (e.g. Solaris). And I don't think this is the case of tcsh either (/bin/csh is probably much

Re: scripting environments (was: /bin/date and coreutils)

2007-05-11 Thread Elias Pipping
On May 11, 2007, at 7:12 PM, Marc André Selig wrote: On 5/11/07, Elias Pipping [EMAIL PROTECTED] wrote: a system that doesn't have bash anywhere should be considered broken ;) Is there really a macports user on solaris? The thread was about making scripts portable, not about making them

Re: scripting environments (was: /bin/date and coreutils)

2007-05-11 Thread Vincent Lefevre
On 2007-05-11 20:25:24 +0200, Elias Pipping wrote: Indeed, I'm missing the point. So... make a script that can live with the bourne shell invoke /bin/sh then The script must be compatible with both Bourne and POSIX shells (because under Solaris, /bin/sh is a Bourne shell). and if it can't,

Re: /bin/date and coreutils

2007-05-10 Thread Vincent Lefevre
On 2007-05-07 12:13:43 -0700, David Liontooth wrote: sorry for thinking it was so unlikely this was ported that I didn't even look! I'll be interested to see what's included. This is very cool, as it allows my scripts to be crossplatform. But you need to use the with_default_names variant

Re: /bin/date and coreutils

2007-05-10 Thread Vincent Lefevre
On 2007-05-10 23:19:50 +0200, Jochen Küpper wrote: On 10.05.2007, at 16:25, Vincent Lefevre wrote: I think that it is a better idea to use Perl instead of shell scripts if you want portable scripts. or Python (my personal favorite;), or ... I've seen many problems after Python upgrades

scripting environments (was: /bin/date and coreutils)

2007-05-10 Thread Jochen Küpper
On 10.05.2007, at 23:56, Vincent Lefevre wrote: And Python isn't installed everywhere. Well, that's not my experience. It's even on all number crunchers and big iron machines I have used over the last years, as scheduling/ batch systems also use it;) And it's a fabulous matlab replacement

Re: /bin/date and coreutils

2007-05-08 Thread Didier Arenzana
2007/5/8, David Liontooth [EMAIL PROTECTED]: Are there disadvantages to installing coreutils -- does it or could it interefere with other programs? I'm a bit queasy, but I guess as long as /opt/local/bin is last in the path it won't interfere. In fact, if I understand correctly the portfile,

Re: /bin/date and coreutils

2007-05-08 Thread David Liontooth
Didier Arenzana wrote: 2007/5/8, David Liontooth [EMAIL PROTECTED]: Are there disadvantages to installing coreutils -- does it or could it interefere with other programs? I'm a bit queasy, but I guess as long as /opt/local/bin is last in the path it won't interfere. In fact, if I understand

/bin/date and coreutils

2007-05-07 Thread David Liontooth
In OSX, /bin/date doesn't support the -d switch date: illegal option -- d In the case of sed, I needed the -r switch and found gsed, providing gnused, in macports, which works great. The date utility is bundled in coreutils on debian, along with cat chown df ln and so on -- I imagine this

Re: /bin/date and coreutils

2007-05-07 Thread Marc André Selig
On 5/7/07, David Liontooth [EMAIL PROTECTED] wrote: In OSX, /bin/date doesn't support the -d switch But it does have the -r switch. ;-) [...] To pick the date, I use DAY=$(date -d -$1 day +%F) The -d switch allows me to subtract days (or minutes or seconds) from today's date. Is

Re: /bin/date and coreutils

2007-05-07 Thread paul beard
On May 7, 2007, at 11:52 AM, David Liontooth wrote: The date utility is bundled in coreutils on debian, along with cat chown df ln and so on -- I imagine this can't easily be ported? I think you're covered: port info coreutils coreutils 6.9, sysutils/coreutils (Variants: universal,

Re: /bin/date and coreutils

2007-05-07 Thread David Liontooth
Marc André Selig wrote: On 5/7/07, David Liontooth [EMAIL PROTECTED] wrote: In OSX, /bin/date doesn't support the -d switch But it does have the -r switch. ;-) [...] To pick the date, I use DAY=$(date -d -$1 day +%F) The -d switch allows me to subtract days (or minutes or seconds)

Re: /bin/date and coreutils

2007-05-07 Thread David Liontooth
paul beard wrote: On May 7, 2007, at 11:52 AM, David Liontooth wrote: The date utility is bundled in coreutils on debian, along with cat chown df ln and so on -- I imagine this can't easily be ported? I think you're covered: port info coreutils coreutils 6.9, sysutils/coreutils