[vchkpw] [semi-OT] which is more portable?

2004-07-15 Thread Jeremy Kitchen
grep vpopmail /etc/passwd | awk -F : '{print $6}' or grep vpopmail /etc/passwd | cut -d':' -f6 Reason I'm asking is I'm making some minor modifications to the Makefile for the chkuser patch and I want to make sure they're as absolutely portable as possible before releasing it to the masses.

Re: [vchkpw] [semi-OT] which is more portable?

2004-07-15 Thread Jeremy Kitchen
On Thursday 15 July 2004 01:31 pm, Jeremy Kitchen wrote: grep vpopmail /etc/passwd | awk -F : '{print $6}' or grep vpopmail /etc/passwd | cut -d':' -f6 Reason I'm asking is I'm making some minor modifications to the Makefile for the chkuser patch and I want to make sure they're as

Re: [vchkpw] [semi-OT] which is more portable?

2004-07-15 Thread Chris Ess
grep vpopmail /etc/passwd | awk -F : '{print $6}' or grep vpopmail /etc/passwd | cut -d':' -f6 I would think that cut would be more portable. However, every machine I've used has had some variant of awk installed too. You might want to consider using 'grep ^vpopmail' or even 'grep

Re: [vchkpw] [semi-OT] which is more portable?

2004-07-15 Thread Nick Harring
Title: Re: [vchkpw] [semi-OT] which is more portable? On Thu, 2004-07-15 at 13:31 -0500, Jeremy Kitchen wrote: grep vpopmail /etc/passwd | awk -F : '{print $6}' or grep vpopmail /etc/passwd | cut -d':' -f6 I'd go with awk, personally. Poking around my network a bit I'm finding cut

Re: [vchkpw] [semi-OT] which is more portable?

2004-07-15 Thread Jeremy Kitchen
On Thursday 15 July 2004 01:51 pm, Chris Ess wrote: grep vpopmail /etc/passwd | awk -F : '{print $6}' or grep vpopmail /etc/passwd | cut -d':' -f6 I would think that cut would be more portable. However, every machine I've used has had some variant of awk installed too. ok, my

Re: [vchkpw] [semi-OT] which is more portable?

2004-07-15 Thread Jeremy Kitchen
On Thursday 15 July 2004 01:58 pm, Nick Harring wrote: On Thu, 2004-07-15 at 13:31 -0500, Jeremy Kitchen wrote: grep vpopmail /etc/passwd | awk -F : '{print $6}' or grep vpopmail /etc/passwd | cut -d':' -f6 I'd go with awk, personally. Poking around my network a bit I'm finding cut

Re: [vchkpw] [semi-OT] which is more portable?

2004-07-15 Thread Eric Ziegast
maybe I'll just make conf-vpopmail be the path to vpopmail's home directory and call it good. T'would be nice to be able to auto-detect it simply based on the user vpopmail was configured with (considering there are probably far less vpopmail implementations that use another user than

Re: [vchkpw] [semi-OT] which is more portable?

2004-07-15 Thread Eric Ziegast
Oops, sorry, didn't mean for that to go to the list. -- Eric Ziegast

Re: [vchkpw] [semi-OT] which is more portable?

2004-07-15 Thread Jeremy Kitchen
On Thursday 15 July 2004 02:48 pm, Eric Ziegast wrote: maybe I'll just make conf-vpopmail be the path to vpopmail's home directory and call it good. T'would be nice to be able to auto-detect it simply based on the user vpopmail was configured with (considering there are probably far less

Re: [vchkpw] [semi-OT] which is more portable?

2004-07-15 Thread Chris Ess
[snip] right, which is why it's better to just specify it in conf-vpopmail. However, I'm having trouble getting that value into a variable in a Makefile, so I'm thinking that just setting it at the top and pointing documentation to change it would be best. Why not just use the backtick

Re: [vchkpw] [semi-OT] which is more portable?

2004-07-15 Thread Tom Collins
On Jul 15, 2004, at 11:31 AM, Jeremy Kitchen wrote: grep vpopmail /etc/passwd | awk -F : '{print $6}' or grep vpopmail /etc/passwd | cut -d':' -f6 How portable is this: X=`cd ~vpopmail; pwd` -- Tom Collins - [EMAIL PROTECTED] QmailAdmin: http://qmailadmin.sf.net/ Vpopmail: