Greetings,
I have a shell script which duplicates a file and then renames the
duplicate file; the trick is that the duplicate file needs to have the
same permissions as the original file. For example:
1. Open file A.txt
2. Manipulate A.txt
3. Save A.txt as A.txt.tmp
4. Rename A.txt.tmp
On Fri, 2003-06-27 at 11:43, Richard Crawford wrote:
Greetings,
I have a shell script which duplicates a file and then renames the
duplicate file; the trick is that the duplicate file needs to have the
same permissions as the original file. For example:
1. Open file A.txt
2.
Richard Crawford wrote:
...
5. Give B.txt the same permissions as A.txt
I assume that there is some set of variables I can look at to find various
attributes of A.txt, so that $APerm = permissions(A.txt) or something, so
I can do chmod $APerm B.txt in step 5.
From the setfacl man page:
On Fri, 2003-06-27 at 09:43, Richard Crawford wrote:
Greetings,
I have a shell script which duplicates a file and then renames the
duplicate file; the trick is that the duplicate file needs to have the
same permissions as the original file. For example:
1. Open file A.txt
2.
Thanks to everyone who replied to this question. I wound up doing it in
Perl. ;-)
Sliante,
Richard S. Crawford
http://www.mossroot.com
AIM: Buffalo2K ICQ: 11646404 Y!: rscrawford
MSN: [EMAIL PROTECTED]
It is only with the heart that we see rightly; what is essential is
invisible to the eye.
* Cameron Simpson
I tend to do this:
find dir -type f -name '*.html' -exec bsed
's|this|long/thing/with/slashes/this|g' {} ';'
or just:
bsed 's|this|long/thing/with/slashes/this|g' *.html
for just the .html files in the current directory.
As far as I understood the question,
* Cameron Simpson
You can get bsed here:
http://www.cskk.ezoshosting.com/cs/scripts/bsed
An extremely useful wrapper for sed.
Not much information here, is it? Can you give a short tutorial?
--
Jon Haugsand, [EMAIL PROTECTED]
http://www.norges-bank.no
--
redhat-list mailing
On 08:22 24 Jun 2003, Jon Haugsand [EMAIL PROTECTED] wrote:
| * Cameron Simpson
| You can get bsed here:
|
| http://www.cskk.ezoshosting.com/cs/scripts/bsed
|
| An extremely useful wrapper for sed.
|
| Not much information here, is it? Can you give a short tutorial?
You treat it just
On 08:21 24 Jun 2003, Jon Haugsand [EMAIL PROTECTED] wrote:
| * Cameron Simpson
|
| I tend to do this:
| find dir -type f -name '*.html' -exec bsed
's|this|long/thing/with/slashes/this|g' {} ';'
| or just:
| bsed 's|this|long/thing/with/slashes/this|g' *.html
| for just the .html
Once I got out of the mindset of having to use a bash shell script for the
task (thanks to a couple of people of this list for the suggestion), I
came up with this script that does the trick (specific IP address and
directory structure stuff changed to protect the innocent):
#!/usr/local/bin/perl
I have an urgent need inside a shell script to replace a filename within
an html file with the absolute url to the file.
For example, http://www.thesite.com/theform.html calls a CGI script. The
FORM tag looks like this:
form name=thisForm method=post action=myScript.pl
What I need to do is
Title: RE: Shell Scripting Question
Make a script using the below. Then change to your highest folder and then run:
# sh name_of_script.sh *.htm
--
#!/bin/ksh
tmpdir=tmp.$$
mkdir $tmpdir.new
for f in $*
do
sed -e 's/action="" href="http://www.thesite.com/mySc
I'm very curious why you want this. Anyway, basically, go to the top
level and run this perl script( NOTE - I haven't even tested this to see
if it will compile, so it will likely delete all your files and set your
computer on fire. But it should give you a starting point):
#!/usr/bin/perl
sub
Jonathan Bartlett said:
I'm very curious why you want this. Anyway, basically, go to the top
level and run this perl script( NOTE - I haven't even tested this to see
if it will compile, so it will likely delete all your files and set your
computer on fire. But it should give you a starting
Jonathan Bartlett said:
I'm very curious why you want this. Anyway, basically, go to the top
level and run this perl script( NOTE - I haven't even tested this to see
if it will compile, so it will likely delete all your files and set your
computer on fire. But it should give you a starting
On 16:18 23 Jun 2003, Richard Crawford [EMAIL PROTECTED] wrote:
| Jonathan Bartlett said:
| I'm very curious why you want this. Anyway, basically, go to the top
| level and run this perl script( NOTE - I haven't even tested this to see
| if it will compile, so it will likely delete all your
I'm just learning how to write shell scripts, and I'd like to find example
scripts to look at. The BASH howto and Advanced BASH howto isn't too great
in this respect.
Take a look at http://www.linuxcommand.org/.
William Shotts, Jr. has put together a very nice tutorial and the site
also
I'm just learning how to write shell scripts, and I'd like to find example
scripts to look at. The BASH howto and Advanced BASH howto isn't too great
in this respect.
Take a look at http://www.linuxcommand.org/.
William Shotts, Jr. has put together a very nice tutorial and the site
also
On 02-Feb-2003/00:51 +, RD Egeland [EMAIL PROTECTED] wrote:
I'm just learning how to write shell scripts, and I'd like to find example
scripts to look at. The BASH howto and Advanced BASH howto isn't too great
in this respect.
The immediate task I'm trying to do is extract a date into a
Hi Ryan:
Here are those promised links:
Bash specific:
http://unix.about.com/cs/shellsbash/
http://users.info.unicaen.fr/~jacques/NAPI/unite-A1/Adv-Bash-Scr-HOWTO/
http://www.gnu.org/manual/bash-2.05a/html_node/bashref.html
http://bashdb.sourceforge.net/
On Sat, 2003-02-01 at 18:51, RD Egeland wrote:
I'm just learning how to write shell scripts, and I'd like to find example
scripts to look at. The BASH howto and Advanced BASH howto isn't too great
in this respect.
The immediate task I'm trying to do is extract a date into a standardized
I'm just learning how to write shell scripts, and I'd like to find example
scripts to look at. The BASH howto and Advanced BASH howto isn't too great
in this respect.
The immediate task I'm trying to do is extract a date into a standardized
format which I can then somehow sort. The text I
Hi Ryan:
I believe I have some link at the office. I will try and remember
to forward them to you on Monday.
In the interim, take a look at the awk command. This will allow
you to reformat the input lines (as well as many other things).
For a start the command:
awk '{print $10 $7 $8
small corrections, the symbol is not needed, awk can read
directly from a file too.
if you want to sort it, it is easier if month is converted to
its numeric equivalent1 to 12 and print a string like:
mmddhhmmss
the following script does that on a test string.
hope it helps
raymundo
On Mon, 16 Dec 2002, Cameron Simpson wrote:
BTW, you don't need all though sloshes, unless this came from a Makefile
(which I doubt because then there'd be lots of doubled $$s floating
around).
Eg:
for idx in 5 4 3 2 1
do if [ -d $$SNAPSHOT/daily.$idx ]
then
Robert P. J. Day wrote:
just to tighten things up, you might consider any or all of the following:
1) use the sequential (and) operator: (or not, personal taste here)
[ -d $SNAPSHOT/daily.$idx ] $MV $SNAP ... etc etc ...
^^
command
On Mon, 16 Dec 2002, Ashley M. Kirchner wrote:
# LOOP through the following directories
for fs in root etc boot yp mysql apache mail home ; do
# LOOP through the 13 (latest) days of the backup
for ((idx=13 ; idx = 2; idx--)) ; do
for idx in $(seq 13 -1 2); do
... whatever ...
done
(not sure if there is a more appropriate forum for discussions
on scripting, are there?)
On Mon, 16 Dec 2002, Ashley M. Kirchner wrote:
for fs in root etc boot yp mysql apache mail home ; do
# LOOP through the 13 (latest) days of the backup
for ((idx=13 ; idx = 2; idx--)) ; do
#
On Mon, 2002-12-16 at 13:03, Robert P. J. Day wrote:
(not sure if there is a more appropriate forum for discussions
on scripting, are there?)
[EMAIL PROTECTED] is exactly for scripting discussions bas php
perl anything that can be run from a command line. There are some very
sharp folks
On 16 Dec 2002, Bret Hughes wrote:
On Mon, 2002-12-16 at 13:03, Robert P. J. Day wrote:
(not sure if there is a more appropriate forum for discussions
on scripting, are there?)
[EMAIL PROTECTED] is exactly for scripting discussions bas php
perl anything that can be run from a
On Mon, 2002-12-16 at 13:37, Robert P. J. Day wrote:
On 16 Dec 2002, Bret Hughes wrote:
On Mon, 2002-12-16 at 13:03, Robert P. J. Day wrote:
(not sure if there is a more appropriate forum for discussions
on scripting, are there?)
[EMAIL PROTECTED] is exactly for scripting
Bret Hughes wrote:
You are correct. My applogies. 15 years putzing with computers and I
still can't type.
Don't feel bad - I'm going on 21 years...and I still hunt-n-peck
--
W | I haven't lost my mind; it's backed up on tape somewhere.
On 19:59 13 Dec 2002, Ashley M. Kirchner [EMAIL PROTECTED] wrote:
|Theoretically, in my head, this ought to function, however I wanted
| to run it past by some of the shell guru's on here, see if anyone spots
| any logistical problems with this. I'm trying to run a particular
| command
On Fri, 13 Dec 2002, Ashley M. Kirchner wrote:
Theoretically, in my head, this ought to function, however I wanted
to run it past by some of the shell guru's on here, see if anyone spots
any logistical problems with this. I'm trying to run a particular
command several time (it's a
On Sat, 14 Dec 2002, Robert P. J. Day wrote:
On Fri, 13 Dec 2002, Ashley M. Kirchner wrote:
Theoretically, in my head, this ought to function, however I wanted
to run it past by some of the shell guru's on here, see if anyone spots
any logistical problems with this. I'm trying
Robert P. J. Day wrote:
first, you should delete the .6 directory, otherwise the .5
directory will be copied as *subdirectory* of .6.
This is being done earlier in the script, yes.
sure, but why use expr? why not just use the arithmetic built
into bash, as in $SNAPSHOT/daily.$((idx+1))
Robert P. J. Day wrote:
arrrgh ... that should have said moved to a, not copied as.
I figured as much. I understood the typo, no worries. Thanks!
--
W | I haven't lost my mind; it's backed up on tape somewhere.
+
Theoretically, in my head, this ought to function, however I wanted
to run it past by some of the shell guru's on here, see if anyone spots
any logistical problems with this. I'm trying to run a particular
command several time (it's a backup script, using cp/rsync). First, the
script
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.
-
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 ([65.54.253.137]) by
mc8-s7.law1.hotmail.com with Microsoft SMTPSVC
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
userfile
name:password:detail:UID
name:password:detail:UID
name:password:detail:UID
name:password:detail:UID
- 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
--
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 script
Command is useradd userfile
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
$NAME='cut -d : -f1'
-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Robert P. J. Day
Sent: Monday, 2 December 2002 07:08
To: [EMAIL PROTECTED]
Subject: Re: Shell scripting help
On Sun, 1 Dec 2002, Bill Horne wrote:
- Original Message -
From: Mikevl [EMAIL PROTECTED]
Hi
Can anybody
error message.
ahp
-Original Message-
From: Mikevl [mailto:[EMAIL PROTECTED]]
Sent: Sunday, December 01, 2002 13:52
To: Redhat-List (E-mail)
Subject: Shell scripting help
*This message was transferred with a trial version of CommuniGate(tm) Pro*
*This message was transferred
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
*This message
-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 : -f1
On Sat, 26 Oct 2002, MET wrote:
if[ $MANPATH ] ; then
It's telling you it can't tokenize the expressions, right? Spacing and
quoting are not optional for this construct. And where is the test
condition? How about changing all your tests to something like:
if [ -n $MANPATH ]; then
I'm trying to start using Qt and I'm having problems setting up the
environmental variables so I guess I'm off to a pretty bad start. Below
is what I have included in my /etc/profile minus the defaults and the
export commands. My export commands are fine as the rest of my
variables work except
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Sat, 26 Oct 2002 16:42:34 -0400, MET wrote:
I'm trying to start using Qt and I'm having problems setting up the
environmental variables so I guess I'm off to a pretty bad start.
Below is what I have included in my /etc/profile minus the
On Tue, 11 Jun 2002, Paul Branston wrote:
On Mon, Jun 10, 2002 at 09:42:56PM -0400, David Kramer wrote:
sed -e '/VirtualHost \*/,/\/VirtualHost/d' /www/conf/httpd.conf
/www/conf/httpd.conf
Hi David,
Did you test this ?? I can tell you from bitter experience that you
need an
10, 2002 11:55 PM
Subject: [REDHAT] Re: [REDHAT] Re: [REDHAT] Shell Scripting
On Mon, 10 Jun 2002, Jesse Angell wrote:
That doesnt look right..
There are many users. I want to delete just that one users
OK, you could have been more specific. Never fear.
perl -e '
while
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
David Kramer wrote:
You are absolutely correct. catting a file and writing to the same file
at the end of the pipe will never work. You can simulate it with perl's
-i parameter, but even that uses a temp file behind the curtains. Sorry
about
sed /'\VirtualHost *\'/,/'\VirtualHost\'/d /www/conf/httpd.conf
will do it, leave out the '/' in the second RegEx match
steve
-Original Message-
From: Jesse Angell [mailto:[EMAIL PROTECTED]]
Sent: 11 June 2002 02:29
To: [EMAIL PROTECTED]
Subject: Shell Scripting
I need to have
On Mon, Jun 10, 2002 at 09:42:56PM -0400, David Kramer wrote:
sed -e '/VirtualHost \*/,/\/VirtualHost/d' /www/conf/httpd.conf
/www/conf/httpd.conf
Hi David,
Did you test this ?? I can tell you from bitter experience that you
need an intermediate file, using sed to read from some file
and
I need to have a script open the file /www/conf/httpd.conf
VirtualHost *
DocumentRoot /var/www/virtual/$user/html
Servername $user.palaceunlimited.com
ErrorLog /var/www/virtual/$user/logs/error_log
CustomLog /var/www/virtual/$user/logs/access_log combined
/VirtualHost
and then delete all of that.
what exactly do you want to delete?
everything between virtualhost * and /virtualhost
or all of your virtualhosts?
or just the ones for specified users?
- Original Message -
From: Jesse Angell [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, June 10, 2002 6:28 PM
Subject: Shell
On Mon, 10 Jun 2002, Jesse Angell wrote:
I need to have a script open the file /www/conf/httpd.conf
VirtualHost *
DocumentRoot /var/www/virtual/$user/html
Servername $user.palaceunlimited.com
ErrorLog /var/www/virtual/$user/logs/error_log
CustomLog /var/www/virtual/$user/logs/access_log
That doesnt look right..
There are many users. I want to delete just that one users
- Original Message -
From: David Kramer [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, June 10, 2002 8:42 PM
Subject: Re: [REDHAT] Shell Scripting
On Mon, 10 Jun 2002, Jesse Angell wrote:
I
Just the one for the specified user
- Original Message -
From: daniel [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, June 10, 2002 8:43 PM
Subject: Re: Shell Scripting
what exactly do you want to delete?
everything between virtualhost * and /virtualhost
or all of your
On Mon, 10 Jun 2002, Jesse Angell wrote:
That doesnt look right..
There are many users. I want to delete just that one users
OK, you could have been more specific. Never fear.
perl -e '
while()
{
$Line .= $_
}
$Line =~ s!VirtualHost.*'${user}'.*?\/VirtualHost!!s;
print $Line;
'
where do you put the filename in that script
- Original Message -
From: David Kramer [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, June 10, 2002 11:55 PM
Subject: Re: [REDHAT] Re: [REDHAT] Shell Scripting
On Mon, 10 Jun 2002, Jesse Angell wrote:
That doesnt look right
On 22:55 07 Apr 2002, vincent li [EMAIL PROTECTED] wrote:
| i need to write a short shell script to get the
| available memory percentage,for example: if i get
| available memory 2033680, and total memory 2555848,
| how could i change these two data into percentage?
|
| if i excute `expr
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Sun, 7 Apr 2002, vincent li wrote:
i need to write a short shell script to get the
available memory percentage,for example: if i get
available memory 2033680, and total memory 2555848,
how could i change these two data into percentage?
if i
Hi, all
i need to write a short shell script to get the
available memory percentage,for example: if i get
available memory 2033680, and total memory 2555848,
how could i change these two data into percentage?
if i excute `expr 2033680 / 2555848` ,result is 0, pls
tell me how to get the
On Fri, 23 Nov 2001, Anthony E. Greene wrote:
type of problem (or is it a 'you thick twit, that's how it works!'?), I
would appreciate it.
You have to source the script into your current shell. If you run it
normally (as a subshell) it returns you to your current shell when it's
done.
On Sat, 24 Nov 2001, rpjday wrote:
i wandered into this late, so i apologize if i misunderstand the
question. but did you try using a shell function instead of a shell
script? since functions are run at the current shell level, doing
something like a cd inside a function really will cd you
I tend to write all of my shell scripts in bash - I like the power and
flexibility. Unfortunately, the environment in which I need to write my
next script is tcsh. Fine, I can learn tcsh if I have to, but perusing the
manual and some web pages, I really don't like the look of tcsh.
The
At 11/23/2001 10:29 AM -0500, you wrote:
However, if I write this in bash, the cd works, and then the script returns
me to where I was! Anyone got a pointer on where I can look to solve this
type of problem (or is it a 'you thick twit, that's how it works!'?), I
would appreciate it.
Script runs
Hey guys.
Where can find docs howto's anything on
shell scripting?
Thanks
Tom.
___
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list
comp.unix.shell
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Tomer Okavi
Sent: Monday, December 11, 2000 4:37 PM
To: Redhat-List@Redhat. Com
Subject: Shell Scripting
Hey guys.
Where can find docs howto's anything on
shell scripting?
Thanks
Tom
"Tomer Okavi" [EMAIL PROTECTED] writes:
Hey guys.
Where can find docs howto's anything on
shell scripting?
You may have these two on board:
HOWTO:
Adv-Bash-Scr-HOWTO
and typing `info bash' at a prompt should bring up the bash manual
in the info reader
If you don't have HOWT
awk '{print $2}'`"
fi
echo "He's dead Jim, He's dead."
---
- Original Message -
From: "Kevin Diffily" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, October 14, 2000 8:24 PM
Subject: Simple Shell Scripting Question
I hav
I have been unable to create a simple program that will kill a
running ppp connection. I have tried
cat /var/run/ppp0|kill
echo /var/run/ppp0|kill
killcat /var/run/ppp0
etc.
Any help will be appreciated.
"The
How about "killall -9 ppp
On Sat, 14 Oct 2000, Kevin Diffily wrote:
I have been unable to create a simple program that will kill a
running ppp connection. I have tried
cat /var/run/ppp0|kill
echo /var/run/ppp0|kill
killcat /var/run/ppp0
etc.
Any help will be appreciated.
On 15-Oct-2000 Kevin Diffily spoke something to the effect:
I have been unable to create a simple program that will kill a
running ppp connection. I have tried
cat /var/run/ppp0|kill
echo /var/run/ppp0|kill
killcat /var/run/ppp0
etc.
Any help will be appreciated.
Here's one that
Uncle Meat wrote:
On 15-Oct-2000 Kevin Diffily spoke something to the effect:
I have been unable to create a simple program that will kill a
running ppp connection. I have tried
cat /var/run/ppp0|kill
echo /var/run/ppp0|kill
killcat /var/run/ppp0
etc.
kill `cat /var/run/ppp0`
Someone suggested that you use killall, but I don't think that really
answers your question.
--
-Time flies like the wind. Fruit flies like a banana. Stranger things have -
-happened but none stranger than this. Does your driver's license say Organ
-Donor?Black holes are where God divided by
Here are two howto's on the subject (scripting in Bash):
http://www.linuxdoc.org/HOWTO/Adv-Bash-Scr-HOWTO/index.html
http://www.linuxdoc.org/HOWTO/Bash-Prog-Intro-HOWTO.html
Regards,
Ben Logan
On Sat, Sep 23, 2000 at 01:09:53AM +0530, srikrishnan wrote:
Please let me know,is any othe site
On Wed, Sep 13, 2000 at 12:30:53PM -0700, Adam Sleight wrote:
[...]
Tutorial on Shell Scripts
http://physics.ucsc.edu/tutor/shell.html
[...]
That one doesn't seem to exist anymore - I get a "Not Found".
Thomas
--
"Look, Ma, no obsolete quotes and plain text only!"
Thomas
Hi Adam Sleight ,
I cannot view the link which you have sent.
Please let me know,is any othe site which gives tutorials or details about
How to Write Shell scripts.
Awaiting in eger,
Srikrishnan.
At 10:21 AM 9/22/00 +0100, you wrote:
On Wed, Sep 13, 2000 at 12:30:53PM -0700, Adam Sleight
I've been using Linux for about three years now and haven't really explored much
beyond the usual bash commands:
mv, ls, mkdir, export, gzip, dd, cat, etc...
I really want to gain more knowledge on shell scripting. (I used to be pretty good at
DOS batch files in my "bad old days"
On Wed, 13 Sep 2000, George Lenzer wrote:
I've been using Linux for about three years now and haven't really explored much
beyond the usual bash commands:
mv, ls, mkdir, export, gzip, dd, cat, etc...
I really want to gain more knowledge on shell scripting. (I used to be pretty good
On Wed, 13 Sep 2000, George Lenzer spewed into the bitstream:
GLI've been using Linux for about three years now and haven't really
GLexplored much beyond the usual bash commands: mv, ls, mkdir, export,
GLgzip, dd, cat, etc...
GL
GLI really want to gain more knowledge on shell scripting. (I used
On Tue, Jul 18, 2000 at 02:22:09PM -0500, Bret Hughes wrote:
| kernel-2.2.14-12.i386.rpm
| kernel-2.2.14-6.0.1.i386.rpm
| kernel-2.2.14-6.1.1.i386.rpm
| How do I get a list of only the newest version of each package
| listed.
| What does ls -t do? It should sort by modification time of the
I am trying to combine a few commands to download and update
rpm packages automatically. Now, I know I can use autorpm and
a few other packages to do this, but I would like to use this
as a learning opportunity.
So far I am using wget to get the list of updates and sed and
cut to get the names
[EMAIL PROTECTED] wrote:
I am trying to combine a few commands to download and update
rpm packages automatically. Now, I know I can use autorpm and
a few other packages to do this, but I would like to use this
as a learning opportunity.
So far I am using wget to get the list of updates and
On Fri, 30 Jun 2000 [EMAIL PROTECTED] wrote:
I'm trying to find a way to write a short bash shell script that can
determing my current dynamic IP address as assigned by my ISP and save
it as a shell variable, then write it to a file with other data all on
one line. Any ideas?
Sure. Run awk,
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
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 way
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 trying
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 one
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...
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
a way
95 matches
Mail list logo