t;
Sent: Friday, October 17, 2003 10:22 PM
Subject: Re: Script treats variable as command
> On Sat, 2003-10-18 at 10:56, lrnobs wrote:
> > I found a script for setting iptables on the internet that I like so
far.
> >
> > The author declares some variables and then uses them l
On Sat, 2003-10-18 at 10:56, lrnobs wrote:
> I found a script for setting iptables on the internet that I like so far.
>
> The author declares some variables and then uses them later on in the script
> ie IFACE="eth0"
>
> When I try to run the script with ./iptables.rules I get a message that
>
ss [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 08, 2003 1:15 PM
To: [EMAIL PROTECTED]
Subject: Re: Script to check if a service is running...restart if not
On Wed, Oct 08, 2003 at 10:03:19AM -0700, John L wrote:
> Good morning. I'm looking for an example of a script that I can r
On Wed, Oct 08, 2003 at 10:03:19AM -0700, John L wrote:
> Good morning. I'm looking for an example of a script that I can run
> as a cron job every five minutes that will check to see if a daemon
> is running (named) and restart it if it is not.
Rough, and untested ...
service $service status &>
At 15:31 10/2/2003, you wrote:
Hi,
I've some files being sftpd into one my servers running Red Hat 9.
I need to move the contents of the destination directory (say testdir)
which includes sub directories (test1 and test2) to another directory
(newdir) with the same sub directories.
When I tried
On Thu, 2003-10-02 at 16:31, Peramslist wrote:
> Hi,
> I've some files being sftpd into one my servers running Red Hat 9.
> I need to move the contents of the destination directory (say testdir) which
> includes sub directories (test1 and test2) to another directory (newdir) with the
> same su
here is the one i used on a aix machine
#!/bin/ksh
LOGFILE=/oracle/KLT/brarchive.log
EMPTY_LOG=/oracle/KLT/empty_log.log
AWK_EXECUTABLE=awk
echo "BRARCHIVE BOS ALANI KONTROL EDIYOR\n" >> $EMPTY_LOG
if [ -n "$1" ] ; then
drive_number=$1
else
exit
fi
used_space=`df $drive_number |grep "$drive_numb
s
> Sent: Friday, September 19, 2003 2:33 PM
> To: [EMAIL PROTECTED]
> Subject: Re: script to monitor diskspace
>
>
> On Fri, 19 Sep 2003 08:41:11 -0400
> Marvin Blackburn <[EMAIL PROTECTED]> wrote:
>
> > Does anyone have a shell script or procedure to monitor dis
On Fri, 19 Sep 2003 08:41:11 -0400
Marvin Blackburn <[EMAIL PROTECTED]> wrote:
> Does anyone have a shell script or procedure to monitor disk space.
> i.e. notify someone when a filesystem gets too big?
>
Lots of ways to do this of course. One simplistic way is to
add the following line to one
On Fri, 2003-09-05 at 13:12, Patrick Nelson wrote:
> RH9
>
> Have a php page and I want the outcome of
>
> du -hs /var/spool/imap/$username | awk '{print $1}'
>
> however, username is (say) joe.user.example.com but the directory is
> joe^user^example^com
>
> Any sed or awk experts help me do t
However, if you want, here goes the "sed" solution:
du -sh /var/spool/mail/`echo -e $USERNAME | sed 's/\./^/'`
[]`s
Tiago.
--
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]
https://www.redhat.com/mailman/listinfo/redhat-list
On 09/05/03 11:12 -0700, Patrick Nelson wrote:
> RH9
>
> Have a php page and I want the outcome of
>
> du -hs /var/spool/imap/$username | awk '{print $1}'
>
> however, username is (say) joe.user.example.com but the directory is
> joe^user^example^com
>
> Any sed or awk experts help me do this
> RH9
>
> Have a php page and I want the outcome of
>
> du -hs /var/spool/imap/$username | awk '{print $1}'
>
> however, username is (say) joe.user.example.com but the directory is
> joe^user^example^com
>
> Any sed or awk experts help me do this in one line? The output is
> simply the amount of s
Thanksappreciate the help..
-Original Message-
From: Chuck Mead [mailto:csm@;redhat.com]
Sent: Tuesday, November 12, 2002 9:22 AM
To: '[EMAIL PROTECTED]'
Subject: RE: script problem at startup
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Tue, 12 Nov 2002, Don Leeper
It's the E key
http://www.redhat.com/docs/manuals/linux/RHL-7.3-Manual/custom-guide/s1-rescuemode-booting-single.html
On Tue, 2002-11-12 at 13:22, Chuck Mead wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> On Tue, 12 Nov 2002, Don Leeper posted the following:
>
> DL>What works if
On Tue, Nov 12, 2002 at 08:23:02AM -0900, Don Leeper wrote:
> What works if your using grub?
Editing the kernel line to add single at the end
Cheers,
--
Javier Gostling
Ingeniero de Sistemas
Virtualia S.A.
[EMAIL PROTECTED]
Fono: +56 (2) 202-6264 x 130
Fax: +56 (2) 342-8763
Av. Kennedy 575
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Tue, 12 Nov 2002, Don Leeper posted the following:
DL>What works if your using grub?
IIRC... push the "A" key and then scroll to the end of the line... input
a space and then type the word "single" and hit enter.
- --
[EMAIL PROTECTED], RHCE
What works if your using grub?
-Original Message-
From: Javier Gostling [mailto:jgostling@;virtualia.cl]
Sent: Tuesday, November 12, 2002 7:18 AM
To: [EMAIL PROTECTED]
Subject: Re: script problem at startup
On Tue, Nov 12, 2002 at 07:05:21AM -0900, Don Leeper wrote:
> I did a
On Tue, Nov 12, 2002 at 07:05:21AM -0900, Don Leeper wrote:
> I did a boo-boo...I put a script in startup and now it hangs and won't
> let it finis booting. It just sits at the point where the script is
> running. How do I get into a safe mode to stop the script from starting?
> Thanks..
Boot to
Use the user under which the cron job will be set-up under. It will use
the same envirnment
david
On Wed, 25 Sep 2002, Barton Hodges wrote:
> I'm not sure this is the right place to ask this
> question, but I'll give it a shot.
>
> I have a perl script that runs as a daemon, listening
> on po
On Thu, Sep 19, 2002 at 02:45:09PM -0700, S Peram wrote:
>
> Hi,
> Thanks a lot for the responses.
> I just had a question regarding the ftp.
> Is there any way I can pass all the parameters such as username, password and the
>commands that are to be executed in a shell script.
Hello
Maybe
Hi Trevor,
Yes that's exactly what I was trying to find.
Thanks again.
Greg
-Original Message-
From: Trevor [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 19, 2002 4:40 PM
To: [EMAIL PROTECTED]
Subject: RE: script for ftp transfer
Greg,
Well, I don't use RH 7.2
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Thursday 19 September 2002 04:14 pm, Siegert, Greg wrote:
> Perhaps you can help me. I'm installing RED Hat v7.3 from CD Rom.
> The boot process stalls after Partition Check: hba:
>
> I was able to get around this before by entering something
Hi,
Thanks a lot for the responses.
I just had a question regarding the ftp.
Is there any way I can pass all the parameters such as username, password and the commands that are to be executed in a shell script.
Your suggestions and comments will be greatly appreciated.
Thanks,
Peram
Trevor <[
On Thu, 19 Sep 2002, S Peram wrote:
> I was thinking of some kind of a cron job but I've run out of ideas.
Try running ncftpput from a cron job on the logging system.
--
"The only thing that helps me maintain my slender grip on reality is the
friendship I share with my collection of singing po
Title: Message
I use
this quick and dirty little perl script to transfer files from my Linux boxes to
our windows backup server:
#!/usr/bin/perlopen (FTP, "|/usr/bin/ftp -n") || die "Can't open FTP
command, $!\n";print FTP <<"EOFTP";open 192.168.1.1user
username passwordbinpromptlcd /backu
e.com/technologies/linux/rhl71dma/>
Good luck!
Trevor
<http://www.gnuguy.com>
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Siegert, Greg
Sent: Thursday, September 19, 2002 2:15 PM
To: '[EMAIL PROTECTED]'
Subject: RE: script for ftp
4:03 PM
To: [EMAIL PROTECTED]
Subject: RE: script for ftp transfer
You have many different options... tell us what is best for you and we can
try help you out.
1. Use smbclient (Samba) to establish a network connection via a share on
your windows machine. Set up a cron job to transfer files to you
You have many different options... tell us what is best for you and we can
try help you out.
1. Use smbclient (Samba) to establish a network connection via a share on
your windows machine. Set up a cron job to transfer files to your box at a
specific time. Use a simple 'cp' command to copy all
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 10-Sep-2002/12:01 +0800, Toto Gamez <[EMAIL PROTECTED]> wrote:
>Im using RH72 and wvdial to connect to the internet but Im only allowed
>to use the telephone from 7-9am, 12-1:30pm and 4-5pm. I'm new to
>scripting but read the Intro to BASH Scriptng
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 04-Sep-2002/13:44 +0800, Ganesan Kanavathy <[EMAIL PROTECTED]> wrote:
>In my company we are using sendmail for our mail server.
>
>For some security reason user are allowed to use the service from 8.30AM to
>5.30AM (working hours) only.
[snip]
>Whe
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
tim wrote:
> Faced with having to re-ip a set of machines that have ip address hard
>coded all over the place in various application and system configuration
>files, what would be the best way to globally change them?
while () {
s/^BOOTPROT0
On Tue, 2001-12-04 at 07:47, Alessandro Coppelli wrote:
>
> Hi to all.
>
> Is there a script that use adduser for add many client from a file
> from a file with this format :
>
>client1 group1 fullname1 passwd1
>client2 group2 fullname2 passwd2
>client3 group3 fullanme pas
On Sat, 21 Apr 2001 12:07:12 -0500, you wrote:
>write a script called lookup. when run, lookup should find the matching
>entries from a file called .addr_book and display the entry.
>example lookup john doe
>outputjohn doe Phone:888-
#!/bin/sh
grep "$*" ~/.addr_book|sort
--
[EMAIL P
On Sat, 21 Apr 2001 [EMAIL PROTECTED] wrote:
> Since I'm new at Unix, I decided that I would take a Unix class. I'm at
> the end of the semester and I have my last assignment. It is writting a
> shell script, which the book nor the instructor covered well. I have to
> write a script called lookup
No, actually i want some help. I did not ask for someone to write it
for
but to give me some help.
___
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list
i need someone to do my homework too.
if you can help, please let me know ...thanx
Since I'm new at Unix, I decided that I would take a Unix class. I'm at
the end of the semester and I have my last assignment. It is writting a
shell script, which the book
On Tue, Apr 10, 2001 at 10:09:46PM -0400, Charles Galpin
<[EMAIL PROTECTED]> wrote:
| For completeness of the perl version, the script below is the same as
| perl -pi -e 's/"//g' filename
| to do an place edit, or use -pi.bak to save a backup.
My take is:
bsed 's/"//g' filename
Of cour
For completeness of the perl version, the script below is the same as
perl -pi -e 's/"//g' filename
to do an place edit, or use -pi.bak to save a backup.
charles
On Tue, 10 Apr 2001, Jacob Killian wrote:
> #!/usr/bin/perl -w
>
> # $file is the file you want to strip the '"' from.
> $file = /
> Warren Melnick
> Director of Research and Development
> Astata Corporation
>
>
>
>
> -Original Message-
> From: Larry Grover [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, April 10, 2001 3:34 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Script (s
esday, April 10, 2001 3:34 PM
To: [EMAIL PROTECTED]
Subject: Re: Script (sed/perl) to remove all quotes (") from a file?
http://gnosis.cx/publish/programming/regular_expressions.html
The "regex" man page (section 7) is also good.
--
Larry Grover, PhD
Assoc Prof of Physiology
Marshal
This is a bunch of examples I use as reference on occasion.
Of course use regular expressions liberally...
\ Escape character, to indicate next character is not to be considered
special metacharacters
& Shortcut, to replace with pattern matches...
. Any single character (wil
#!/usr/bin/perl -w
# $file is the file you want to strip the '"' from.
$file = /path/to/filename;
# $tmp is the file we write w/o the '"'s
$tmp = /path/to/tmp;
# If you want to get $file and $tmp from the command line, remove the
# previous two lines ($file... and $tmp...), and uncomment the ne
http://gnosis.cx/publish/programming/regular_expressions.html
The "regex" man page (section 7) is also good.
--
Larry Grover, PhD
Assoc Prof of Physiology
Marshall Univ Sch of Med
On Tuesday 10 April 2001 15:10, Mitchell Henderson wrote:
> hi
> try searching google for regular expressions.
>
I can't think of a script command right now. But if you open the file
with vi, you can do this:
:%s/"//g
This will remove all ". Good luck,
Hidong
Dan B wrote:
>
> Can anyone give me a quick reference for building a script that removes all
> quotes (" symbols) from a given file?
>
>
hi
try searching google for regular expressions.
On Tue, Apr 10, 2001 at 12:06:07PM -0700, Dan B wrote:
> Can anyone give me a quick reference for building a script that removes all
> quotes (" symbols) from a given file?
>
> I imagine a sed or perl script could do it. Is there any good free
Vineeta wrote:
> ok.guys ,in my previous mail i just wanted to highlight the vi
> command.and so put it in quotes.
> What i was saying is:
> vi aa dd and not vi "aa dd"
> will open 2 files for edit
> That's all.
> Again quotes were not intended to be part of the commands i wrote.Only
> to highli
ok.guys ,in my previous mail i just wanted to highlight the vi
command.and so put it in quotes.
What i was saying is:
vi aa dd and not vi "aa dd"
will open 2 files for edit
That's all.
Again quotes were not intended to be part of the commands i wrote.Only
to highlight it.
If it's lead to confusi
John,
We have cleared up that you can have files with spaces (even just spaces
:) ), and you have been given solutions to script the rename.
However, I'm curious as to why these files are a "problem" in the first
place?
charles
On Sat, 20 Jan 2001, John Aldrich wrote:
> Anyone have a script o
On Mon, Jan 22, 2001 at 12:09:19PM +0530, Vineeta <[EMAIL PROTECTED]> wrote:
| But,if you are going to try something like vi "aa dd" where "aa dd" is the
| filename,it will interpret it as 2 different files to be edited.
Feh.
vi "aa dd"
works just fine.
--
Cameron Simpson, DoD#743
Vineeta wrote:
> I suppose you did not pay attention to what i wrote.
> simply typing:
> vi aa bb
>
> > Vineeta wrote:
> > >
> > > But,if you are going to try something like vi "aa dd" where "aa dd" is the
> > > filename,it will interpret it as 2 different files to be edited.
Reading your ow
Vineeta wrote:
> I suppose you did not pay attention to what i wrote.
> simply typing:
> vi aa bb
> will create 2 files
> unless you put them in quotes.
> What i wrote was precisely this.
>
Actually your example used the quotes
Bret
___
Redhat-lis
On Mon, 22 Jan 2001, you wrote:
> First of all,unix does not permit spaces in filenames.
> Are you trying to put your files from a windows m/c to unix??
>
Lemme put it this way: the files I downloaded include spaces in their names.
:-) And someone already posted a script to fix this. :-) Further,
On Mon, Jan 22, 2001 at 12:09:19PM +0530, Vineeta wrote:
> But,if you are going to try something like vi "aa dd" where "aa dd" is the
> filename,it will interpret it as 2 different files to be edited.
Uh...well...sorry, no. If you do exactly what you said:
vi "foo bar"
you will create
I suppose you did not pay attention to what i wrote.
simply typing:
vi aa bb
will create 2 files
unless you put them in quotes.
What i wrote was precisely this.
Vineeta
Micah Yoder wrote:
> Vineeta wrote:
> >
> > But,if you are going to try something like vi "aa dd" where "aa dd" is the
> > fi
Vineeta wrote:
>
> But,if you are going to try something like vi "aa dd" where "aa dd" is the
> filename,it will interpret it as 2 different files to be edited.
nope. I just did a
kwrite "test file"
and
vi "test file"
and both created a file called "test file" without quotes and with the
sp
But,if you are going to try something like vi "aa dd" where "aa dd" is the
filename,it will interpret it as 2 different files to be edited.
You can have space between filenames only if you use a little bit of
scripting,stuff like ,if you say put a file from windows to unix named "aa
bb.txt".It re
On Mon, Jan 22, 2001 at 11:50:53AM +0530, Vineeta wrote:
> First of all,unix does not permit spaces in filenames.
Uh...I guess I'll be the first to get to say, this is Not True. Very,
very Not True. Unix (and by extension Linux) not only have always allowed
spaces (although many of the tools ar
First of all,unix does not permit spaces in filenames.
Are you trying to put your files from a windows m/c to unix??
Vineeta
John Aldrich wrote:
> Anyone have a script or util that'll rename files with
> spaces in 'em such that spaces become underscores? It's a
> real bear when you have several
John,
Here's a short little script that will do only what you
asked. It works within a single directory and, as written,
will not descend a directory tree. It will replace one
space or consecutive spaces in a file name with a single
underscore. As you can see, you must supply the directory
nam
On Sat, 20 Jan 2001 at 10:14pm (-0500), John Aldrich wrote:
> Anyone have a script or util that'll rename files with
> spaces in 'em such that spaces become underscores? It's a
> real bear when you have several HUNDRED files :-)
> John
>
#!/usr/bin/perl
# GLOBALS ##
On Sat, 20 Jan 2001, Ed Alexander wrote:
> There was an article in "Server/Workstation Expert"
> magazine last October which explained in detail how
> to do exactly what you're asking. Get the file:
>
> http://swexpert.com/C2/SE.C2.OCT.00.pdf
>
Ed... I know you're probably working on the old "
On Sat, 20 Jan 2001, Ed Alexander wrote:
> There was an article in "Server/Workstation Expert"
> magazine last October which explained in detail how
> to do exactly what you're asking. Get the file:
>
> http://swexpert.com/C2/SE.C2.OCT.00.pdf
>
Thanks...:-) it'll save me a TON of time and trou
There was an article in "Server/Workstation Expert"
magazine last October which explained in detail how
to do exactly what you're asking. Get the file:
http://swexpert.com/C2/SE.C2.OCT.00.pdf
HTH.
Cheers,
Ed
On Sat, 20 Jan 2001, John Aldrich wrote:
>
>Anyone have a script or util that'll ren
There is one thing you can do. Assuming you you are running a bash script,
you can change the shebang to add the -xv switches. Then you can set
export PS4='+${0##*/} line $LINENO: '
It's just like a debugger :-)
--
-Time flies like the wind. Fruit flies like a banana. [EMAIL PROTECTED]
-Strang
Gate wrote:
> Can anyone give me a hand? Thanks in advance!
I got bored, so I wrote the attached perl script. It does pretty close
to what you said you wanted, but I wrote it the way I think such a
script should be written. It should be easier to use in the future, if
you need to do something v
On Thu, 13 Apr 2000, Gate wrote:
> What I need is this.
>
> -# of times user logged in to nas Bud-PM2
> -Total number of logins
> -Username
> -All ONLY correct logins (i.e. the "Login OK").
>
> and printed to a file like this:
>
> username:Budlogs:Totlogs
>
> Can anyone give me a hand? Thanks
On Thu, 23 Mar 2000, Steve Lee wrote:
> what does it mean when you type this.
>
> find . -name *_ -exec ~/oiuncomp {} \;
find in all directories under this directory (including in this
directory) (.) all files that have names that END with _ (-name \*_), and
for each file found, run the comma
A simpler more integrated way would be to include the persist option in your
/etc/ppp/options. (see the ppp man)
"Anthony E. Greene" wrote:
> At 21:58 2000-03-20 -0700, Adahma wrote:
> >I messed with a script for a while, and then found that wvdial was
> >my easiest solution. No script req'd si
At 21:58 2000-03-20 -0700, Adahma wrote:
>I messed with a script for a while, and then found that wvdial was
>my easiest solution. No script req'd since it automagically redials
>when disconnected. I don't call it from a cron, but that should not
>be a problem I wouldn't think.
I'm not sure how
Adahma wrote:
>
> On Mon, Mar 20, 2000 at 03:52:51PM -0600, Stephen Hargrove wrote:
> > Stephen M Lavelle wrote:
> > >
> > > i have a cron job which dials up isp at 8am each morning.
> > > I need a small script which can check (periodically) if the link is
> > > still up and if it is not then red
On Mon, Mar 20, 2000 at 03:52:51PM -0600, Stephen Hargrove wrote:
> Stephen M Lavelle wrote:
> >
> > i have a cron job which dials up isp at 8am each morning.
> > I need a small script which can check (periodically) if the link is
> > still up and if it is not then redial and reconnect.
> > Any po
Stephen M Lavelle wrote:
>
> i have a cron job which dials up isp at 8am each morning.
> I need a small script which can check (periodically) if the link is
> still up and if it is not then redial and reconnect.
> Any pointers/examples please?
Run this using cron:
!#/bin/sh
if [ `/sbin/route -n
FOR THE TWO STEPHENS!
Use the following function in your script:
pppisup(){
[ "`/sbin/route -n|/bin/grep -E '^0.0.0.0.*ppp'`" ]
pppisup holds true if the link is up.
Easy eh? Pilfered it from someone's domail script.
Edward Dekkers (Director)
Triple D Computer Services Pty. Ltd.
Western Aus
On Tue, Mar 21, 2000 at 08:53:49AM +1100, Stephen M Lavelle wrote:
> i have a cron job which dials up isp at 8am each morning.
> I need a small script which can check (periodically) if the link is
> still up and if it is not then redial and reconnect.
> Any pointers/examples please?
> Regards,
> S
Stephen M Lavelle wrote:
> i have a cron job which dials up isp at 8am each morning.
> I need a small script which can check (periodically) if the link is
> still up and if it is not then redial and reconnect.
> Any pointers/examples please?
Well, I've written a script that runs multiple Seti cl
Stephen M Lavelle wrote:
>
> i have a cron job which dials up isp at 8am each morning.
> I need a small script which can check (periodically) if the link is
> still up and if it is not then redial and reconnect.
> Any pointers/examples please?
> Regards,
> Steve
> PS. I am not interested in using
Thanks Charles.
You are always helpful to me when ever i post a message.
Thanks Again.
Charles Galpin wrote:
> perl -pi.bak -e 's/(\d+),(\d+)\.(\d{2})/$1$2\.$3/g' yourfile
>
> the old file will be renamed yourfile.bak
>
> hth
> charles
>
> On Thu, 9 Mar 2000, Steve Lee wrote:
>
> > can someone h
Hi Steve,
It would be helpful if you would be a bit more specific about what you're
trying to do. I'm having trouble interpreting your question.
Do you mean to:
* delete entire lines if they contain "8,000.00" or "9,000.00" anywhere
egrep -v '[89],000\.00' infile >outfile
* delete
perl -pi.bak -e 's/(\d+),(\d+)\.(\d{2})/$1$2\.$3/g' yourfile
the old file will be renamed yourfile.bak
hth
charles
On Thu, 9 Mar 2000, Steve Lee wrote:
> can someone help me write
> a script to remove , out of a file
> lines of data with price that has
>
> 9,000.00
> 8,000.00
>
>
> etc
>
On Thu, 9 Mar 2000, Steve Lee wrote:
> can someone help me write
> a script to remove , out of a file
> lines of data with price that has
>
> 9,000.00
> 8,000.00
grep -v "9,000\.00" thefile.txt | grep -v "8,000\.00"
should do the trick.
Nico
>
>
> etc
>
> about 710 line of these with t
Chuck Mead wrote:
>
> On Tue, 28 Dec 1999, [EMAIL PROTECTED] said:
>
> >I run a small mail server for some schools that cannot afford their own and
> >from time to time I get a list of new users who need accounts. I would like
> >to automate this as much as possible on my box running RH 6.1.
>
Try something like this (untested)
cat | awk '{printf("-p %s %s\n",$2,$1)}' | xargs useradd
or you could try this:
cat | awk '{printf("useradd -M -p %s %s\n",$2,$1)}' > myfile
chmod 777 myfile
myfile
HTH, HAND
Bill Ward
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROT
you may use expect to enter the passwords
try man expect
manux
>> On Tue, 28 Dec 1999, [EMAIL PROTECTED] said:
>>
>> >I run a small mail server for some schools that cannot afford their own and
>> >from time to time I get a list of new users who need accounts. I would like
>> >to automate th
> On Tue, 28 Dec 1999, [EMAIL PROTECTED] said:
>
> >I run a small mail server for some schools that cannot afford their own and
> >from time to time I get a list of new users who need accounts. I would like
> >to automate this as much as possible on my box running RH 6.1.
> >
> >I was wonderin
On Tue, 28 Dec 1999, [EMAIL PROTECTED] said:
>I run a small mail server for some schools that cannot afford their own and
>from time to time I get a list of new users who need accounts. I would like
>to automate this as much as possible on my box running RH 6.1.
>
>I was wondering if anyone kn
yes, you are correct. I thought I'd apologized already, but obviously not
profusely enough. I was thinking of psoix regex, and didn't test before
opening my mouth and inserting my foot.
again, sorry for the misinformation, and thank you for pointing it oot.
charles
On Mon, 13 Dec 1999, Ward Will
: Friday, December 10, 1999 8:29 PM
To: [EMAIL PROTECTED]
Cc: recipient.list.not.shown; @nswcphdn.navy.mil
Subject: Re: script
actually, the '.' will match any character. So it will also match
dead_letters, dead-letters, deadaleters etc.
hth charles
On Fri, 10 Dec 1999, Vidiot wrote:
>
oops. my bad. You are absolutely correct.
charles
On Sun, 12 Dec 1999, Cameron Simpson wrote:
> On Fri, Dec 10, 1999 at 08:29:10PM -0500, Charles Galpin wrote:
> | actually, the '.' will match any character. So it will also match
> | dead_letters, dead-letters, deadaleters etc.
> [...]
> | On F
On Fri, Dec 10, 1999 at 08:29:10PM -0500, Charles Galpin wrote:
| actually, the '.' will match any character. So it will also match
| dead_letters, dead-letters, deadaleters etc.
[...]
| On Fri, 10 Dec 1999, Vidiot wrote:
| > >find / -name "dead.letters" -exec rm {} /;
Um, no. RTFM, my man. This
Please try this approach instead:
find / -iname dead.letters | xargs rm
The difference is that the minimal number of rm commands will be executed to
get the job done. The -exec will cause one process for every file that
matches. Not a big deal if there are only a few files, but it can be a very
Saturday, December 11, 1999 2:29 AM
Subject: Re: script
| actually, the '.' will match any character. So it will also match
| dead_letters, dead-letters, deadaleters etc.
|
| hth charles
|
| On Fri, 10 Dec 1999, Vidiot wrote:
|
| > >find / -name "dead.letters" -exec rm {}
actually, the '.' will match any character. So it will also match
dead_letters, dead-letters, deadaleters etc.
hth charles
On Fri, 10 Dec 1999, Vidiot wrote:
> >find / -name "dead.letters" -exec rm {} /;
> >
> >Note, all of that has to be there.
> >HTH, HAND
> >Bill Ward
>
> The double-quotes
but I try to always be VERY explicit about what I want to do if I'm
running as root.
Bill Ward
-Original Message-
From: Vidiot [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 10, 1999 4:36 PM
To: [EMAIL PROTECTED]
Cc: recipient.list.not.shown; @nswcphdn.navy.mil
Subject: Re: scri
>find / -name "dead.letters" -exec rm {} /;
>
>Note, all of that has to be there.
>HTH, HAND
>Bill Ward
The double-quotes are not necessary as there are no embedded special
characters or spaces.
MB
--
e-mail: [EMAIL PROTECTED]
[Where do you think Microsoft would be today if they waited]
find / -name "dead.letters" -exec rm {} /;
Note, all of that has to be there.
HTH, HAND
Bill Ward
-Original Message-
From: Steve Lee [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 10, 1999 2:43 PM
To: RedHat Maillist
Cc: recipient.list.not.shown; @nswcphdn.navy.mil
Subject: script
I
>I'm no programmer.
>can somoone show me a quick
>script that would run through
>the whole system to remove
>dead.letters off the system.
No script needed, simple command:
find / -iname dead.letters -exec rm {} \;
MB
--
e-mail: [EMAIL PROTECTED]
[Where do you think Microsoft would be t
Put this in a file:
#!/bin/sh
find / -type f -name dead.letter -print -exec rm {} \;
Make it executable (chmod 700) and run that (from cron)
J.
| - Original Message -
| From: "Steve Lee" <[EMAIL PROTECTED]>
| To: "RedHat Maillist" <[EMAIL PROTECTED]>
| Sent: Friday, December 1
#!/bin/sh
find / -type f -name dead.letter -print -exec rm {} \;
Put the above in a file and make it executable (chmod 700)
and run that
J.
- Original Message -
From: "Steve Lee" <[EMAIL PROTECTED]>
To: "RedHat Maillist" <[EMAIL PROTECTED]>
Sent: Friday, December 10, 1999 8:43 PM
Sub
>
> Surely someone can beat 9 bytes.. Anyone? Anyone? Beuller? Wait! I can!
>
> #!/usr/bin/perl -pi.bak
> y/\t/|/;
>
> That's 8 bytes. :-P
ok, Beuller here :). try 7
y/\t/|/
The ';' can be excluded if it's a one liner. But who's counting.
> : all conversion is done inplace .. thanks to
1 - 100 of 132 matches
Mail list logo