I'm interested in learning a little about bash scripting. In particular, I'd
like to learn how to tell if the user logging on is logging in under X or from
a command prompt. Can anyone point me in the direction of where I can find this
information? Thanks...
-Chris
Necrotica wrote:
>
> I'm interested in learning a little about bash scripting. In particular, I'd
> like to learn how to tell if the user logging on is logging in under X or from
> a command prompt. Can anyone point me in the direction of where I can find this
> information? Thanks...
>
> -Chris
Civileme wrote:
>
> Necrotica wrote:
> >
> > I'm interested in learning a little about bash scripting. In particular, I'd
> > like to learn how to tell if the user logging on is logging in under X or from
> > a command prompt. Can anyone point me in the direction of where I can find this
> > info
Thanks for the help, guys. That was exactly what I was looking for!
-Chris
On Sat, 10 Jun 2000, Civileme wrote:
> Civileme wrote:
> >
> > Necrotica wrote:
> > >
> > > I'm interested in learning a little about bash scripting. In particular, I'd
> > > like to learn how to tell if the user loggin
Necrotica wrote:
>
> I'm interested in learning a little about bash scripting. In particular, I'd
> like to learn how to tell if the user logging on is logging in under X or from
> a command prompt. Can anyone point me in the direction of where I can find this
> information? Thanks...
>
> -Chris
I have a list of positive integers of which I only want the first one.
They are of arbitrary size. How can I cut the rest of them off?
I've been trying to write a regular expression for this using sed or awk.
Want to buy your Pack or Services from MandrakeSoft?
Go to http://www.mandrakestore.c
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Saturday 11 January 2003 08:56 pm, Jim C wrote:
> I have a list of positive integers of which I only want the first one.
> They are of arbitrary size. How can I cut the rest of them off?
> I've been trying to write a regular expression for this usin
> On Saturday 11 January 2003 08:56 pm, Jim C wrote:
> > I have a list of positive integers of which I only want the first one.
> > They are of arbitrary size. How can I cut the rest of them off?
> > I've been trying to write a regular expression for this using sed or awk.
you don't specify the fo
The are already sorted. I just need the largest one which is the first one.
Mark Weaver wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Saturday 11 January 2003 08:56 pm, Jim C wrote:
I have a list of positive integers of which I only want the first one.
They are of arbitrary size. Ho
On Saturday 11 January 2003 08:56 pm, Jim C wrote:
I have a list of positive integers of which I only want the first one.
They are of arbitrary size. How can I cut the rest of them off?
I've been trying to write a regular expression for this using sed or awk.
you don't specify the format of
> >>>I have a list of positive integers of which I only want the first one.
> >>>They are of arbitrary size. How can I cut the rest of them off?
> >>>I've been trying to write a regular expression for this using sed or
> >>> awk.
> >
> > you don't specify the format of the integers. are they spac
On Sat, Jan 11, 2003 at 05:56:16PM -0800, Jim C wrote:
> I have a list of positive integers of which I only want the first one.
> They are of arbitrary size. How can I cut the rest of them off?
> I've been trying to write a regular expression for this using sed or awk.
#!/bin/sh
LIST="42 666 1776
On Sat, 11 Jan 2003 17:56:16 -0800
Jim C <[EMAIL PROTECTED]> wrote:
> I have a list of positive integers of which I only want the first one.
> They are of arbitrary size. How can I cut the rest of them off?
> I've been trying to write a regular expression for this using sed or awk.
>
>
>
bash
On Sun, 12 Jan 2003 09:15:50 -0800
Mark Alexander <[EMAIL PROTECTED]> wrote:
> On Sat, Jan 11, 2003 at 05:56:16PM -0800, Jim C wrote:
> > I have a list of positive integers of which I only want the first one.
> > They are of arbitrary size. How can I cut the rest of them off?
> > I've been trying
Wow. I didn't know bash had arrays. Kool. :-)
jipe wrote:
On Sat, 11 Jan 2003 17:56:16 -0800
Jim C <[EMAIL PROTECTED]> wrote:
I have a list of positive integers of which I only want the first one.
They are of arbitrary size. How can I cut the rest of them off?
I've been trying to write a reg
Great but now I have another problem.
What I am trying to do is create a sort of virtual file.
I've already tried using the here document and it doesn't seem to be
working for me. What I am trying to do exactly is create an LDIF file
for passing to an LDAP database. I have each line stored in
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Jim C wrote on Mon, Jan 13, 2003 at 10:16:41AM -0800 :
>
> What I am trying to do is create a sort of virtual file.
> I've already tried using the here document and it doesn't seem to be
> working for me. What I am trying to do exactly is create an
I finally got around to giving your suggestion a try. :-)
cat > $newldif <
dn: uid=$1,ou=Computers,dc=microverse,dc=net
objectClass: top
objectClass: account
objectClass: posixAccount
uidNumber: $store
uid: $1
cn: $1
gidNumber: $groupnum
homeDirectory: /dev/null
loginShell: /bin/false
gecos: Machi
Grrr!!
What gets me is why this doesn't work:
echo -e $output > ldapadd -x -D $binddn -W $pw4binddn
where echo -e produces:
[root@enigma scripts]# ./adduser alkjdfal
dn: uid=alkjdfal,ou=Computers,dc=microverse,dc=net
objectClass: top
objectClass: account
objectClass: posixAccount
uidNumber: 5
On Tue, 14 Jan 2003 12:58:30 -0800
Jim C <[EMAIL PROTECTED]> wrote:
> Grrr!!
>
> What gets me is why this doesn't work:
>
> echo -e $output > ldapadd -x -D $binddn -W $pw4binddn
>
> where echo -e produces:
>
> [root@enigma scripts]# ./adduser alkjdfal
>
> dn: uid=alkjdfal,ou=Computers,dc=mic
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Jim C wrote on Tue, Jan 14, 2003 at 11:31:20AM -0800 :
> I finally got around to giving your suggestion a try. :-)
>
> cat > $newldif < dn: uid=$1,ou=Computers,dc=microverse,dc=net
> objectClass: top
> objectClass: account
> objectClass: posixAccount
jipe wrote:
here is what says man:
The entry information is read from standard input or from file through the use of the -f option.
so why not to try this:
echo -e "$output" | ldapadd -x -D "cn=root,dc=microverse,dc=net"
This produces an error, i.e. I get the usage text for ldapadd if I tr
echo $newldif
This produces:
[root@enigma scripts]# ./adduser adlfalj
./adduser: line 42: $newldif: ambiguous redirect
You've got something else going on cause it works on mine. (Are you
sure that you're using the bash shell?)
[root@enigma scripts]# echo $SHELL
/bin/bash
[root@enigma scripts]
Herein lies part of the problem.
I don't want to use a file for scaleability reasons and I can't think of
any reason why it should be nescesary. In theory I should be able to
store all of the text in a shell variable and then redirect the output
of echo to ldapadd. So far I can get the text in
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Jim C wrote on Tue, Jan 14, 2003 at 07:28:07PM -0800 :
> >newldif="./file2"
> Herein lies part of the problem.
> I don't want to use a file for scaleability reasons and I can't think of
> any reason why it should be nescesary. In theory I should be
25 matches
Mail list logo