Thanks Alex and linux-Fan, this worked for me :)
--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive:
http://lists.debian.org/CAGWVfMnbgxHar3OzNrE=piqDCfbCTZr3=jhl43regwepnoe...@mail.gmail.com
On 02/07/2013 03:54 PM, Muhammad Yousuf Khan wrote:
> Thanks for the hint i have been going through couple of howtos but it
> is still not working same error i put this line at the bottom of the
> VISUDO still no luck
>
> %ykhan ALL = NOPASSWD: /usr/bin/myscript
>
btw %ykhan -means members of g
On 02/07/2013 03:54 PM, Muhammad Yousuf Khan wrote:
> Thanks for the hint i have been going through couple of howtos but it
> is still not working same error i put this line at the bottom of the
> VISUDO still no luck
>
> %ykhan ALL = NOPASSWD: /usr/bin/myscript
>
> when i run the script with use
On 02/07/2013 03:54 PM, Muhammad Yousuf Khan wrote:
> Thanks for the hint i have been going through couple of howtos but it
> is still not working same error i put this line at the bottom of the
> VISUDO still no luck
>
> %ykhan ALL = NOPASSWD: /usr/bin/myscript
>
> when i run the script with user
Thanks for the hint i have been going through couple of howtos but it
is still not working same error i put this line at the bottom of the
VISUDO still no luck
%ykhan ALL = NOPASSWD: /usr/bin/myscript
when i run the script with user ykhan still give me the same error.
would you please be kind en
On 02/07/2013 02:10 PM, Muhammad Yousuf Khan wrote:
> i have got a /data folder where no one has rights accept user "root".
> and for some reasons or reducing my dependency i have created a script
> which include
> "mkdir" command
>
> like this
>
> mkdir /data/example
>
> the script own by the u
On Tue, Apr 17, 2012 at 4:52 PM, Eduardo M KALINOWSKI
wrote:
> On Ter, 17 Abr 2012, Chris wrote:
>> I would like have the Smtp: replaced with To: leaving all that follows in
>> each line untouched and piped into a new file.
>
> man sed
>
Read that too, but try also searching online for "sed tuto
perl -e 'while(<>){chomp; s/root/Root/g; print "$_\n"; }' /etc/passwd
Il giorno 17 aprile 2012 15:52, Eduardo M KALINOWSKI <
edua...@kalinowski.com.br> ha scritto:
> On Ter, 17 Abr 2012, Chris wrote:
>
>> Firstly I petty much suck at scripting so I need help.
>>
>> I have a file where each lin
On Ter, 17 Abr 2012, Chris wrote:
Firstly I petty much suck at scripting so I need help.
I have a file where each line begins with
Smtp:
I would like have the Smtp: replaced with To: leaving all that
follows in each line untouched and piped into a new file.
man sed
--
The majority of hu
On 11/02/2010 05:04 AM, Karl Vogel wrote:
>On the other hand, if someone sneaks something like
>result_04: dc="3" rm /something/valuable
Thank you! very informative, and, kinda fun to read.
--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of "unsubscr
>> On Mon, 01 Nov 2010 15:49:01 +0800,
>> Zhang Weiwu said:
Z> A program output is like this:
Z> result_01: a="23" b="288" c="A_string" ac="34"
Z> result_02: a="23" b="28" c="A_string_too" dc="3"
Z>
Z> I am writing a script to output values of b if b is in the result set.
If your
2010/5/19 Eric Persson :
> I have a small bashscript which prepares a dual-monitor setup for my laptop,
> since i'm moving in and out of the office and meetings, I tend to attach and
> disconnect the monitor a few times a day.
>
> That works fine with xrandr, but the issue is that I would like some
Kumar Appaiah wrote:
On Wed, Jul 01, 2009 at 09:28:23AM -0500, Kumar Appaiah wrote:
for i in *zzz;do
mv "$i" $(echo "$i"|sed 's/^...//');
done
But I'd recommend one of these: mrename, krename, gprename,
renameutils and more (all apt-gettable, of course).
Oh, and I think prename (or just renam
On Wed, Jul 01, 2009 at 07:22:33AM -0700, Marc Shapiro wrote:
> I am sure that this is an easy question for those people who do any
> reasonable amount of scripting. I'm just not one of them.
>
> How can I rename all of the files ina directory with the new name being
> the old name stripped of
Marc Shapiro writes:
> I am sure that this is an easy question for those people who do any
> reasonable amount of scripting. I'm just not one of them.
>
> How can I rename all of the files ina directory with the new name
> being the old name stripped of its leftmost three characters. If all
> of
On 2009-07-01 18:20 (+0300), Teemu Likonen wrote:
> find -type f -print0 | xargs -0 sh -c 'for file in "$@";
> do dir=$(dirname -- "$file") && base=$(basename -- "$file") &&
> (cd "$dir" && echo mv -- "$base" "${base#???}"); done' ignore
Let's simplify it a bit:
find -type f
On 2009-07-01 07:22 (-0700), Marc Shapiro wrote:
> How can I rename all of the files ina directory with the new name
> being the old name stripped of its leftmost three characters. If all
> of the files are off the format:
>
> xxxy.zzz
>
> I want the new names to be of th
In <4a4b7129.7010...@yahoo.com>, Marc Shapiro wrote:
>I am sure that this is an easy question for those people who do any
>reasonable amount of scripting. I'm just not one of them.
>
>How can I rename all of the files ina directory with the new name being
>the old name stripped of its leftmost thr
Marc Shapiro writes:
[...]
> How can I rename all of the files ina directory with the new name
> being the old name stripped of its leftmost three characters.
My favorite way to do this is with sed and xargs. First have sed
print the current name, then use an regexp to change it to the new
On Wed, Jul 01, 2009 at 09:28:23AM -0500, Kumar Appaiah wrote:
> On Wed, Jul 01, 2009 at 07:22:33AM -0700, Marc Shapiro wrote:
> > How can I rename all of the files ina directory with the new name
> > being the old name stripped of its leftmost three characters. If
> > all of the files are off the
On Wed, Jul 01, 2009 at 07:22:33AM -0700, Marc Shapiro wrote:
> How can I rename all of the files ina directory with the new name
> being the old name stripped of its leftmost three characters. If
> all of the files are off the format:
>
> xxxy.zzz
>
> I want the new na
On Thu, 10 Jul 2008 17:04:38 -0500, Kent West wrote:
>> tar -cvzf - --one-file-system /home | split -b 2000m -
Side note since the problem has been solved.
You might want to look into dar, which will do splitting for you
automatically, as well as many other desired features for backup
(incremen
Owen Townend wrote:
Kent West wrote:
Am I just not seeing a typo somewhere? Why is my script failing?
Hey,
You're missing the '-' for stdin
tar -czvf - --one-file-system $sourceDir | split -b 2000m - $targetFile
Ah, thank you!
--
Kent West <")))><
West
> > tar -cvzf - --one-file-system /home | split -b 2000m -
> /TERASTATIONBACKUP/GOSHEN/2008/2008-Jul-10.tgz
vs
> > tar -czvf - --one-file-system $sourceDir | split -b 2000m $targetFile
> Am I just not seeing a typo somewhere? Why is my script failing?
>
> Thanks!
Hey,
You're missing the '-' fo
michael wrote:
> echo Usage\: $0 [string file]
> echo To loop until \$string found in \$file
Better to quote the entire line. Because [...] is special to the
shell the [string file] will try to file glob match against files in
the local directory. It is unlikely to match in this case but
On 25/04/2008, michael <[EMAIL PROTECTED]> wrote:
>
>
> while [[ `grep -e ${STRING} ${FILE} |wc -l` -lt 1 ]];do
This should fix it:
while [[ `grep -e "${STRING}" "${FILE}" |wc -l` -lt 1 ]];do
The shell still replaces variable within "" quotes, but not within ''.
e.g. this:
$ TEST="Testing
On Thu, 2008-04-24 at 16:02 +, Mark Clarkson wrote:
> On Thu, 24 Apr 2008 16:52:14 +0100, michael
> <[EMAIL PROTECTED]> wrote:
> > Folks, I wish to do something like the following in a bash script but
> > can't work out the correct incantation of escape chars etc so any advice
> > welcome! ie w
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 04/24/08 10:52, michael wrote:
> Folks, I wish to do something like the following in a bash script but
> can't work out the correct incantation of escape chars etc so any advice
> welcome! ie what is it I need to do for env var STRING and the grep
>
On 21.09.07 08:18, Michael Martinell wrote:
> My script is as follows:
> #!/bin/sh
>
> TERM=vt100
> export TERM
forcing TERM in script is very bad idea, and in this script also useless.
> date && echo " Spam Count" && /bin/more /var/log/syslog | /bin/grep -c
> 'identified spam' && echo " " && ec
One possible approach would be to use a few files and use paste on those
files where:
dfile holds date,
mfile holds good messages,
sfile holds spam messages
tfile is temporary file
paste dfile mfile >tfile
paste tfile sfile >dfile
rm mfile
rm sfile
rm tfile
cat dfile
hth.
--
To UNSUBSCRIB
On 21-sep-2007, at 15:51, Michael Martinell wrote:
Thanks - that was exactly what I was looking for.
Now I just need to find a good scripting tutorial. :)
Try http://www.tldp.org/LDP/Bash-Beginners-Guide/html/index.html
That's where I learned my scripting basics.
Peter
--
To UNSUBSCRI
Thanks - that was exactly what I was looking for.
Now I just need to find a good scripting tutorial. :)
-Original Message-
From: Michael Marsh [mailto:[EMAIL PROTECTED]
Sent: Friday, September 21, 2007 8:38 AM
To: debian-user@lists.debian.org
Subject: Re: scripting question
On 9/21/07
On 9/21/07, Michael Martinell <[EMAIL PROTECTED]> wrote:
> I have a simple script that counts up the number of spam messages each day
> and prints the total number into a text field. This is fine as far as it
> goes, however I would like to also include the date and the number of
> non-spam messag
Man echo reveals that the -n switch prevents echo from appending a new
line. Also, you do not need to use more (or less) with grep. Grep can
take a file agrument. Refer to grep's man page for more information.
--
Neil Watson | Debian Linux
System Administrator| Uptime 6 days
ht
Am 2007-06-24 22:24:56, schrieb s. keeling:
> L.V.Gandhi <[EMAIL PROTECTED]>:
> > --=_Part_150443_25730719.1182692831198
> > Content-Type: text/plain; charset=UTF-8; format=flowed
> > Content-Transfer-Encoding: base64
> > Content-Disposition: inline
> >
> >
> > T24gNi8yMy8wNywgR2FicmllbC
On 6/24/07, s. keeling <[EMAIL PROTECTED]> wrote:
L.V.Gandhi <[EMAIL PROTECTED]>:
> --=_Part_150443_25730719.1182692831198
> Content-Type: text/plain; charset=UTF-8; format=flowed
> Content-Transfer-Encoding: base64
> Content-Disposition: inline
>
> T24gNi8yMy8wNywgR2FicmllbCBQYXJyb25kby
L.V.Gandhi <[EMAIL PROTECTED]>:
> --=_Part_150443_25730719.1182692831198
> Content-Type: text/plain; charset=UTF-8; format=flowed
> Content-Transfer-Encoding: base64
> Content-Disposition: inline
>
> T24gNi8yMy8wNywgR2FicmllbCBQYXJyb25kbyA8Zy5wYXJyb25kb0BnbWFpbC5jb20+IHdyb3Rl
> Ogo+Cj4gR
On 6/24/07, Matus UHLAR - fantomas <[EMAIL PROTECTED]> wrote:
On 23.06.07 14:23, L.V.Gandhi wrote:
> Subject: scripting - cat breaking line
> I have a file temp1 as below
> [EMAIL PROTECTED]:~/stock$ cat temp1
> ABB,ABB LTD., 4730.00, 4779.00, 4700.00, 4726.45
,59655
> ACC,A
On 6/23/07, Gabriel Parrondo <[EMAIL PROTECTED]> wrote:
El sáb, 23-06-2007 a las 18:43 -0700, L.V.Gandhi escribió:
> On 6/23/07, Wu-Kung Sun <[EMAIL PROTECTED]> wrote:
> The bash manpage says "If the substitution appears within
> double
> quotes, word splitting and pathna
On 23.06.07 14:23, L.V.Gandhi wrote:
> Subject: scripting - cat breaking line
> I have a file temp1 as below
> [EMAIL PROTECTED]:~/stock$ cat temp1
> ABB,ABB LTD., 4730.00, 4779.00, 4700.00, 4726.45,59655
> ACC,ACC LIMITED, 860.00, 864.90, 844.30, 852.25
El sáb, 23-06-2007 a las 18:43 -0700, L.V.Gandhi escribió:
> On 6/23/07, Wu-Kung Sun <[EMAIL PROTECTED]> wrote:
> The bash manpage says "If the substitution appears within
> double
> quotes, word splitting and pathname expansion are not
> performed on the
> r
On 6/23/07, - Tong - <[EMAIL PROTECTED]> wrote:
Wu-Kung Sun, have solve the line breaking problem.
Now something else.
On Sat, 23 Jun 2007 14:23:34 -0700, L.V.Gandhi wrote:
> [EMAIL PROTECTED]:~/stock$ for line in $(cat temp1);do echo
> "20070622,$line">>temp2 ;done
FYI, the best approach fo
On 6/23/07, Wu-Kung Sun <[EMAIL PROTECTED]> wrote:
The bash manpage says "If the substitution appears within double
quotes, word splitting and pathname expansion are not performed on the
results." So try "$(cat temp1)"
-
Thanks for the reply. However result was
[EMAIL PROTECTED]:~$ for line i
Wu-Kung Sun, have solve the line breaking problem.
Now something else.
On Sat, 23 Jun 2007 14:23:34 -0700, L.V.Gandhi wrote:
> [EMAIL PROTECTED]:~/stock$ for line in $(cat temp1);do echo
> "20070622,$line">>temp2 ;done
FYI, the best approach for your above is to use sed, which can still
mainta
The bash manpage says "If the substitution appears within double
quotes, word splitting and pathname expansion are not performed on the
results." So try "$(cat temp1)"
--
swk
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
On Fri, Jun 22, 2007 at 09:23:32AM -0400, Michael Matthews <[EMAIL PROTECTED]>
was heard to say:
> I am wondering if anyone can tell me if there's an easy way, when using
> `apt-get upgrade`, to get around the pop-up configuration screens that occur
> with some updates. One example of this is wit
Karl E. Jorgensen wrote:
> # DEBIAN_FRONTEND=noninteractive apt-get install whatever
In addition to this to be truly batch mode you may want to set
DEBCONF_ADMIN_EMAIL="" too.
# DEBCONF_ADMIN_EMAIL="" DEBIAN_FRONTEND=noninteractive apt-get install -q -y
whatever
That will prevent email from b
Awesome, I changed that but I had to select "Noninteractive," and "Ignore
questions with priority lower than ," and this worked to keep the
kernel boot screen off.
Thank you!
On 6/22/07, Karl E. Jorgensen <[EMAIL PROTECTED]> wrote:
On Fri, Jun 22, 2007 at 09:23:32AM -0400, Michael Matthews wro
On Fri, Jun 22, 2007 at 09:23:32AM -0400, Michael Matthews wrote:
> All,
>
> I am wondering if anyone can tell me if there's an easy way, when using
> `apt-get upgrade`, to get around the pop-up configuration screens that occur
> with some updates. One example of this is with a kernel update. It
Slightly more information. From reading man dpkg, does anyone thing that
the following would be useful? I don't really know what it means by "shell
escape," but does that mean when it pops up the reboot screen for kernels?
ENVIRONMENT VARIABLES
DPKG_NO_TSTP
Define this to som
john gennard wrote:
I'm trying to understand Debian's startup procedure and
follow the relevant scripts. Where can I find a tutorial
on scripting?
For example, /etc/init.d/rc - I can roughly understand
what is happening (the comments often indicate the way), but
the finer points are obscure. I'v
Roberto C. Sanchez wrote:
On Thu, Mar 15, 2007 at 05:14:48PM -0700, Bob McGowan wrote:
Nigel,
I cannot find a package 'abs-guide' for etch. I've tried several
different permutations (-guide, guide[too much!], abs-), nothing is found.
Is there is typo here or is there some other repository t
On Fri, Mar 16, 2007 at 10:07:28AM -0400, Celejar wrote:
> It's in non-free; you have to add non-free in your sources.list.
I just checked out the license (included below), in
/usr/share/doc/abs-guide/copyright . It definitely suggests
that the author is not riding the cluetrain.
Steve
This pack
Le vendredi 16 mars 2007 15:07, Celejar a écrit :
> On Thu, 15 Mar 2007 17:14:48 -0700
> Bob McGowan <[EMAIL PROTECTED]> wrote:
>
> [snip]
>
> > Nigel,
> >
> > I cannot find a package 'abs-guide' for etch. I've tried several
> > different permutations (-guide, guide[too much!], abs-), nothing is
>
On Thu, 15 Mar 2007 17:14:48 -0700
Bob McGowan <[EMAIL PROTECTED]> wrote:
[snip]
> Nigel,
>
> I cannot find a package 'abs-guide' for etch. I've tried several
> different permutations (-guide, guide[too much!], abs-), nothing is found.
>
> Is there is typo here or is there some other reposito
Le jeudi 15 mars 2007 17:36, john gennard a écrit :
> I'm trying to understand Debian's startup procedure and
> follow the relevant scripts. Where can I find a tutorial
> on scripting?
>
> For example, /etc/init.d/rc - I can roughly understand
> what is happening (the comments often indicate the wa
Bob McGowan wrote:
Nigel Henry wrote:
On Thursday 15 March 2007 17:36, john gennard wrote:
I'm trying to understand Debian's startup procedure and
follow the relevant scripts. Where can I find a tutorial
on scripting?
For example, /etc/init.d/rc - I can roughly understand
what is happening (th
On 3/16/07, Bob McGowan <[EMAIL PROTECTED]> wrote:
I cannot find a package 'abs-guide' for etch. I've tried several
different permutations (-guide, guide[too much!], abs-), nothing is found.
http://personal.riverusers.com/~thegrendel/abs-guide-4.2.tar.bz2
http://personal.riverusers.com/~thegre
On Thu, Mar 15, 2007 at 05:14:48PM -0700, Bob McGowan wrote:
>
> Nigel,
>
> I cannot find a package 'abs-guide' for etch. I've tried several
> different permutations (-guide, guide[too much!], abs-), nothing is found.
>
> Is there is typo here or is there some other repository to add to
> sou
Nigel Henry wrote:
On Thursday 15 March 2007 17:36, john gennard wrote:
I'm trying to understand Debian's startup procedure and
follow the relevant scripts. Where can I find a tutorial
on scripting?
For example, /etc/init.d/rc - I can roughly understand
what is happening (the comments often ind
On Thursday 15 March 2007 17:36, john gennard wrote:
> I'm trying to understand Debian's startup procedure and
> follow the relevant scripts. Where can I find a tutorial
> on scripting?
>
> For example, /etc/init.d/rc - I can roughly understand
> what is happening (the comments often indicate the w
Hello Anil,
On Tue, Jun 20, 2006 at 03:36:49PM +0530, Anil Gupte wrote:
| OK, I figured out the problem, but not the solution. The output is
| actually from a SQL query. The output looks like this (when echoed):
|
| Serial_Number
| TLO03
|
| It is getting the field name and the field valu
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Anil Gupte wrote:
> OK, I figured out the problem, but not the solution. The output
> is actually from a SQL query. The output looks like this (when
> echoed):
>
> Serial_Number TLO03
>
> It is getting the field name and the field value as two
-
> From: "Hal Vaughan" <[EMAIL PROTECTED]>
> To:
> Sent: Monday, June 19, 2006 11:00 PM
> Subject: Re: Scripting question
>
>
> > On Monday 19 June 2006 13:00, Anil Gupte wrote:
> >> Why does
> >>
> >> echo /l3dat/${Serial_Nuum
www.icinema.com
- Original Message -
From: "Hal Vaughan" <[EMAIL PROTECTED]>
To:
Sent: Monday, June 19, 2006 11:00 PM
Subject: Re: Scripting question
On Monday 19 June 2006 13:00, Anil Gupte wrote:
Why does
echo /l3dat/${Serial_Nuumber}.tar.gz
give me
/l3dat/ TLO3.
On Monday 19 June 2006 13:00, Anil Gupte wrote:
> Why does
>
> echo /l3dat/${Serial_Nuumber}.tar.gz
>
> give me
>
> /l3dat/ TLO3.tar.gz
>
> In other words, why is it putting an etra space in there (after the
> second /) and how can I get rid of it?
>
> And yes, there is no space there. I check
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Anil Gupte wrote:
> Why does
>
> echo /l3dat/${Serial_Nuumber}.tar.gz
>
> give me
>
> /l3dat/ TLO3.tar.gz
>
> In other words, why is it putting an etra space in there (after
> the second /) and how can I get rid of it?
>
> And yes, there is no
Hello Anil,
On Mon, Jun 19, 2006 at 10:30:16PM +0530, Anil Gupte wrote:
| Why does
|
| echo /l3dat/${Serial_Nuumber}.tar.gz
^^ Is this a typo?
|
| give me
|
| /l3dat/ TLO3.tar.gz
|
| Serial_Number=${Serial_Number##" "}
|
| and the variable prints the same before an
On Tue, 17 Jan 2006 08:37:05 +0100 Almut Behrens <[EMAIL PROTECTED]> wrote:
> On Tue, Jan 17, 2006 at 07:40:48AM +0100, John Smith wrote:
> > "text:\n someothertext" to "text: someothertext"
> >
> Personally, I'd use perl for this kind of thing:
>
> $ perl -p0e 's/text:\n someothertext/te
On Tue, Jan 17, 2006 at 07:40:48AM +0100, John Smith wrote:
> Hi All,
>
> how do you change (from the command line) with (sed/awk/...
> anything that's available in the installation environment)
>
> "text:\n someothertext" to "text: someothertext"
>
> The trick is in the new
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
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
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='
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
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)}' ;
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"
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
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
Thank you very much! Everything works fine now :-).
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
On Sat, 2004-11-06 at 23:10 +, Thomas Adam wrote:
> --- Silvan Villiger <[EMAIL PROTECTED]> wrote:
>
> > I've started to learn scripting in linux. But I have some troubles
> > understandig the redirection of the streams. I tried to test whether a
> > directory already exists using the ls c
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Sat, Nov 06, 2004 at 11:46:04PM +0100, Silvan Villiger wrote:
> Hi,
>
> I've started to learn scripting in linux. But I have some troubles
> understandig the redirection of the streams. I tried to test whether
> a directory already exists using t
--- Silvan Villiger <[EMAIL PROTECTED]> wrote:
> I've started to learn scripting in linux. But I have some troubles
> understandig the redirection of the streams. I tried to test whether a
> directory already exists using the ls command (didn't find a bether
> solution) and whenever ls doesn'
On Thu, Nov 20, 2003 at 10:56:01AM -0600, Lucas Bergman wrote:
> Matt Price <[EMAIL PROTECTED]> writes:
>
> > David Z Maze wrote:
> >
> > is it possible in bash to test whether a comand has actually worked?
>
> The '||' operator does this, like:
>
> #!/bin/sh
> gnuclient "$@" || xemacs -noma
Matt Price <[EMAIL PROTECTED]> writes:
> David Z Maze wrote:
>
> > See earlier commentary about XEmacs; gnuclient(1) is the XEmacs
> > equivalent to emacsclient, and it does claim to support a -nw
> > option. I could see things being unhappy if you set $EDITOR to
> > that, but it's easy enough to
On Thu, Nov 20, 2003 at 04:29:39PM +, Colin Watson wrote:
> On Thu, Nov 20, 2003 at 10:49:45AM -0500, Matt Price wrote:
> > is it possible in bash to test whether a comand has actually worked?
> > I feel like I've seen such tests, but I tried one and can't make it
> > work for me:
> >
> > #!
On Thu, Nov 20, 2003 at 10:49:45AM -0500, Matt Price wrote:
> is it possible in bash to test whether a comand has actually worked?
> I feel like I've seen such tests, but I tried one and can't make it
> work for me:
>
> #! /bin/bash
> if [ 'gnuclient -q $*' ]; then
That's definitely wrong: 'gnu
Thank you all for excellent suggestions and links. Now, off to dabble. :-)
Anil Gupte
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
> -Original Message-
> From: Anil Gupte [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, 19 November 2003 11:29 AM
> To: [EMAIL PROTECTED]
> Subject: Scripting Manuals
>
>
> Where can I find some good scripting manuals that will teach
> me (a newbie) to write bash shell scripts?
>
> Thanx
On Tue, 18 Nov 2003 18:15:30 -0600,
Anil Gupte wrote:
>
> Where can I find some good scripting manuals that will teach me
> (a newbie) to write bash shell scripts?
http://www.shelldorado.com/
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAI
On Tue, 18 Nov 2003 16:47:39 -0800
shawn <[EMAIL PROTECTED]> wrote:
> On Tue, Nov 18, 2003 at 06:15:30PM -0600, Anil Gupte wrote:
> > Where can I find some good scripting manuals that will teach me (a newbie)
> > to write bash shell scripts?
> the advanced bash scripting guide (assumes no pr
On Tue, Nov 18, 2003 at 04:47:39PM -0800, shawn wrote:
> On Tue, Nov 18, 2003 at 06:15:30PM -0600, Anil Gupte wrote:
> > Where can I find some good scripting manuals that will teach me (a newbie)
> > to write bash shell scripts?
> the advanced bash scripting guide (assumes no previous
>
On Tue, Nov 18, 2003 at 06:15:30PM -0600, Anil Gupte wrote:
> Where can I find some good scripting manuals that will teach me (a newbie)
> to write bash shell scripts?
the advanced bash scripting guide (assumes no previous
scripting experience).
http://www.tldp.org/LDP/abs/h
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
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
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_
also sprach Eric d'Alibut <[EMAIL PROTECTED]> [2002.04.17.0500 +0200]:
> I see no one has commented on your example, which I take as proof
> positive that this entire thread belongs in a museum somewhere, perhaps
> next to the 'How many angels can dance on the head of a pin' scholastic
> debates.
On Tue, 2002-04-16 at 13:41, Joey Hess wrote:
> [EMAIL PROTECTED]:~>perl hello.pl
> hello, world!
> [EMAIL PROTECTED]:~>cat hello.pl
> #!/usr/bin/perl
> use Inline C => q{
> void hello () {
> printf("hello, world!\n");
> }
> };
> hello();
Programmable script! Um...
Shawn McMahon <[EMAIL PROTECTED]> writes:
> begin John S. J. Anderson quotation:
> >
> > I'm confused by the above statement. Canceling out the double
> > negative, I get
> >
> > "that is the definition most people mean when they know enough to
> > call non-scripting 'programming'".
>
>
Joey Hess <[EMAIL PROTECTED]> writes:
> Or what of this example:
>
> [EMAIL PROTECTED]:~>perl hello.pl
> hello, world!
> [EMAIL PROTECTED]:~>cat hello.pl
> #!/usr/bin/perl
> use Inline C => q{
> void hello () {
> printf("hello, world!\n");
> }
> };
> hello();
That
Shawn McMahon <[EMAIL PROTECTED]> writes:
> See the followup email. It ain't my scheme, and I don't agree with it;
> I was presenting what my experience shows is usually meant by people who
> don't know better than the split "scripting" and "programming".
Ah, I see -- we're mostly agreeing at th
1 - 100 of 140 matches
Mail list logo