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."
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.
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 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.
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 t
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 .
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
* 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
* 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 quest
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 you
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 starti
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 starti
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
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.the
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
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
-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 defa
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 fo
x | grep pppd | grep -v grep | 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, 2
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 zer
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
> > kill > etc.
kill `cat /var/run/ppp0`
Use bac
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
> kill etc.
>
> Any help will be appreciated.
Here's one that will work if us
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
> kill etc.
>
> Any help will be appreciated.
> _
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
killhttps://listman.redhat.com/mailman/listinfo/redhat-list
24 matches
Mail list logo