Re: scripting problem

2005-11-27 Thread John Smith
Thanks guys, learned a lot from this thread, especially from Almut's reaction! What I tried to do is copy the encrypted password from /etc/shadow to newly installed system and kept running into trouble because of the $'s in the string. Finally I thought about use

Re: scripting problem

2005-11-26 Thread d
On Sat, Nov 26, 2005 at 10:08:58PM +0100, John Smith wrote: > > [EMAIL PROTECTED]:/home/user/tmp >cat t5.sh > #!/bin/sh > > export INPUT='$1$iW95z/HB$GFcYFxMKK6x8EUPglVkux.' > > echo "1 ==="$INPUT"===" > > export MD5PW=$(echo -n "$INPUT" | hexdump -v -e '" " 1/1 "%02d"') > > echo "2 ==="${MD5P

Re: scripting problem

2005-11-26 Thread Almut Behrens
On Sat, Nov 26, 2005 at 08:16:31PM +0100, John Smith wrote: > does somebody know why I keep losing the first character of the > third resulting string? > > === > > [EMAIL PROTECTED]:/home/user/tmp >cat t4.sh > #!/bin/sh > > export INPUT='

Re: scripting problem

2005-11-26 Thread Alfredo Finelli
On Saturday 26 November 2005 20:16, John Smith wrote: > Hi All, > > does somebody know why I keep losing the first character of the > third resulting string? > > Sincerely, Two ways in which it works: 1) $ cat t4.sh #!/bin/sh export INPUT='$1$iW95z/HB$GFcYFxMKK6x8EUPglVkux.' echo

Re: scripting problem

2005-11-26 Thread John Smith
On Sat, 26 Nov 2005 15:31:24 -0500 Michael Marsh <[EMAIL PROTECTED]> wrote: > On 11/26/05, Jan de Haan <[EMAIL PROTECTED]> wrote: > > David Koski <[EMAIL PROTECTED]> wrote: > > > > echo -n "3 ===";echo -n ${MD5PW} | tr ' ' '\n' | while read char ; do > > > > awk \ > > > > '{printf("%c",$char)}' ;

Re: scripting problem

2005-11-26 Thread Michael Marsh
On 11/26/05, Jan de Haan <[EMAIL PROTECTED]> wrote: > David Koski <[EMAIL PROTECTED]> wrote: > > > echo -n "3 ===";echo -n ${MD5PW} | tr ' ' '\n' | while read char ; do awk > > > \ > > > '{printf("%c",$char)}' ; done ; echo "===" [EMAIL > > > PROTECTED]:/home/user/tmp > > > > Try to replace "awk"

Re: scripting problem

2005-11-26 Thread Jan de Haan
David Koski <[EMAIL PROTECTED]> wrote: > > > echo -n "3 ===";echo -n ${MD5PW} | tr ' ' '\n' | while read char ; do awk \ > > '{printf("%c",$char)}' ; done ; echo "===" [EMAIL PROTECTED]:/home/user/tmp > > Try to replace "awk" with "echo $char | awk". > > I know that doesn't answer your question

Re: scripting problem

2005-11-26 Thread David Koski
On Saturday 26 November 2005 11:16 am, John Smith wrote: > Hi All, > > does somebody know why I keep losing the first character of the > third resulting string? > > Sincerely, > echo -n "3 ===";echo -n ${MD5PW} | tr ' ' '\n' | while read char ; do awk \ > '{printf("%c",$char)}' ; done ; ec

scripting problem

2005-11-26 Thread John Smith
Hi All, does somebody know why I keep losing the first character of the third resulting string? Sincerely, Jan. === [EMAIL PROTECTED]:/home/user/tmp >cat t4.sh #!/bin/sh export INPUT='$1$iW95z/HB$GFcYFxMKK6x8EUPglVkux.' echo "1 ==="

Re: Scripting problem "syntax error in expression (error token is "0 0 - + 95 ")"

2002-06-28 Thread Michael Epting
On Fri, Jun 28, 2002 at 04:11:18AM +0200, Erik Ljungstr?m wrote: > Just curious, how can you script bash from windows? Or do you reboot > and send you emails from Microsoft outlook express just for fun? I can't answer the original question, but the answer to this question is "cygwin". It gives o

Re: Scripting problem "syntax error in expression (error token is "0 0 - + 95 ")"

2002-06-27 Thread louie miranda
uot;louie miranda" <[EMAIL PROTECTED]> Cc: Sent: Friday, June 28, 2002 10:11 AM Subject: Re: Scripting problem "syntax error in expression (error token is "0 0 - + 95 ")" > > > On Fri, 28 Jun 2002 10:06:20 +0800 > "louie miranda" <[EMAIL PRO

Re: Scripting problem "syntax error in expression (error token is "0 0 - + 95 ")"

2002-06-27 Thread Ljungström
On Fri, 28 Jun 2002 10:06:20 +0800 "louie miranda" <[EMAIL PROTECTED]> wrote: > #!/bin/sh > S_CATXT1=`grep "Jun\ 28" /var/log/local1.1 |grep "READ: \^B20"|grep > 21:777 > |wc -` > S_CATXT2=`grep "Jun\ 28" /var/log/local1 |grep "READ: \^B20"|grep > 21:777 > |wc -l` > S_CATXT_T=$(( $S_CATXT1 + $S_

Scripting problem "syntax error in expression (error token is "0 0 - + 95 ")"

2002-06-27 Thread louie miranda
#!/bin/sh S_CATXT1=`grep "Jun\ 28" /var/log/local1.1 |grep "READ: \^B20"|grep 21:777 |wc -` S_CATXT2=`grep "Jun\ 28" /var/log/local1 |grep "READ: \^B20"|grep 21:777 |wc -l` S_CATXT_T=$(( $S_CATXT1 + $S_CATXT2 )) echo $S_CATXT_T appshost2:/noc/scripts# ./txtme-102 ./txtsmart-102: 0 0 0

RE: Bash scripting problem

2000-05-02 Thread Christophe ABRIAL
etc/modules.conf echo "DEBUG3: found_driver=$found_driver" Hope it's help! Christophe Abrial LSA France Systems and Networks Solutions -Message d'origine- De : Martin Fluch [mailto:[EMAIL PROTECTED] Envoye : mardi 2 mai 2000 09:43 A : debian-user@lists.debian.org Ob

Bash scripting problem

2000-05-02 Thread Martin Fluch
Hi all! On my woody box I ran into the following problem: After I had problem with the /etc/init.d/alsa script I started to track down the problem and finaly ended with the following script, which doesn't work like I expect: #!/bin/bash -e found_driver=0 echo -n "Starting sound dri