On Wed, 4 Dec 2002, Ziad Samaha wrote:
> cat usefile | awk -F: '{ print $1 }'
No need for the pipe, since awk can read a file directly. For a small
economy, use
awk -F: '{ print $1 }' usefile
instead.
--
"Whenever I feel blue, I start breathing again."
- U
red file.
Regards,
Ziad
From: Mikevl <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
Subject: RE: Shell scripting help
Date: Mon, 2 Dec 2002 08:17:21 +1300
MIME-Version: 1.0
Received: from mc8-f1.law1.hotmail.com ([6
> -Original Message-
> From: Mikevl
> Sent: Sunday, December 01, 2002 11:14 AM
> Subject: Shell scripting help
>
>
> Hi
>
> Can anybody help with this simple script
>
> Command is useradd userfile
>
>
> useradd
> userfile=$1
> s=0
> for i in 'cat $userfile ';do
> $NAME='cut -d
ld like
[root@Lizzi root]# ./addscusers scusers
cut -d : -f1
[root@Lizzi root]#
Many thanks
Mike
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Adam H. Pendleton
Sent: Monday, 2 December 2002 07:56
To: [EMAIL PROTECTED]
Subject: RE: Shell scripting help
root@Lizzi root]# ./addscusers scusers
> ./addscusers: =/bin/cut -d : -f1: No such file or directory
>
> Many thanks
>
> Mike
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Robert P. J. Day
> Sent: Monday, 2 Decembe
On Sun, 1 Dec 2002, Bill Horne wrote:
> - Original Message -
> From: "Mikevl" <[EMAIL PROTECTED]>
>
>
> > Hi
> >
> > Can anybody help with this simple script
> >
> > Command is useradd userfile
> >
> >
> > useradd
> > userfile=$1
> > s=0
> > for i in 'cat $userfile ';do
> >
EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Bill Horne
Sent: Monday, 2 December 2002 06:40
To: [EMAIL PROTECTED]
Subject: Re: Shell scripting help
- Original Message -
From: "Mikevl" <[EMAIL PROTECTED]>
> Hi
>
> Can anybody help with this simple
- Original Message -
From: "Mikevl" <[EMAIL PROTECTED]>
> Hi
>
> Can anybody help with this simple script
>
> Command is useradd userfile
>
>
> useradd
> userfile=$1
> s=0
> for i in 'cat $userfile ';do
> $NAME='cut -d : -f1'
> echo $NAME
> done
info cut.
HTH.
Bill
On Tue, 5 May 1998, Jason wrote:
>
> I'm trying to write a shell script that will automatically let me modify
> the mail settings for sendmail.cf without having to go into the file and
> do it.
What details are you exactly modififing in sendmail.cf? You will probably
find there is a lot nicer
Hello !!!
[snip]
-e Enable interpretation of the following backslash-
escaped characters in the strings:
\a alert (bell)
\b backspace
\c suppress trailing newline
\f form feed
\n n
On Tue, May 05, 1998 at 02:43:16PM -0400, Jason wrote:
>
> I'm trying to write a shell script that will automatically let me modify
> the mail settings for sendmail.cf without having to go into the file and
> do it.
>
> I need a way to force it to echo a "tab" command, but I can't seem to find
>
I got several replies, and thanks everyone !:)
Are there any other \ functions I should know about? I already use
\ to 'ignore' certain characters @'s and such.. any other useful ones? :)
Thanks again,
/j
On Tue, 5 May 1998, Chris Tyler wrote:
> Jason <[EMAIL PROTECTED]> wrote:
> >
> > I'm tr
Hey,
Try this:
---cut here
#!/bin/sh
echo "hello\c"
echo "\t\c"
echo "there"
echo "\n"
---cut here
The \t echoes a tab character; the \c supresses the newline that would
otherwise be added.
Hope that helps...
Dek
Jason <[EMAIL PROTECTED]> wrote:
>
> I'm trying to write a shell script that will automatically let me modify
> the mail settings for sendmail.cf without having to go into the file and
> do it.
>
> I need a way to force it to echo a "tab" command, but I can't seem to find
> a way to do that. I got
14 matches
Mail list logo