Skip to Content.
Sympa Menu

baslinux - Re: [BL] bash help; changing case of file names, hyperlinks

baslinux AT lists.ibiblio.org

Subject: Baslinux mailing list

List archive

Chronological Thread  
  • From: sindi keesan <keesan AT sdf.lonestar.org>
  • To: baslinux AT lists.ibiblio.org
  • Subject: Re: [BL] bash help; changing case of file names, hyperlinks
  • Date: Sat, 24 Feb 2007 23:53:37 +0000 (UTC)

On Sat, 24 Feb 2007, Karolis Lyvens wrote:

On Sat, Feb 24, 2007 at 05:17:39AM +0000, sindi keesan wrote:
I have proposed this to the people at my list and asked them to make any
changes suitable to our system. If the user is running the script from
their own directory the script could simply copy the file from my
directory to theirs and change the login.

What I want to do is replace keesan with their login name (I was not very
clear about this). Would the following do that if run from the user's own
directory?

These commands should succeed if your .procmailrc and .forward files
were world-readable. chmod 644 if they are not.

And my script needs to be world-executable and readable (chmod +xr) but not world-writable. I hope staff will put a link to it on the path.

cat ~keesan/procmailrc.sample | sed -e /keesan/`whoami`/ > .procmailrc
cat ~keesan/procmailrc.sample | sed -e "/keesan/`whoami`/g" > ~/.procmailrc

This would replace all occurences of "keesan" on the line (not only the
first match) and would replace .procmailrc in the user's HOME directory,
not present working directory.
cat ~keesan/.forward > .forward
cat ~keesan/.forward > ~/.forward
How would I append to existing .procmailrc and .forward instead of
replacing/creating them?

Use ">>" instead of ">"

I can also use $USER instead of `whoami`.
Is the following correct?

cat ~keesan/procmailrc.sample | sed -e "/keesan/$USER/g" >> ~/.procmailrc

There is only one occurrence of keesan. Do I need the g?

I need to explain to people how to exit the menu system to the shell. I was told Bourne shell (sh?) might not run the script, but anyone who switched from the default shell will know how to edit already.


-snip-

We lost the staff member who was going to write something up because he
got tired of the bickering among other members. The person who helped me
with .procmailrc spam filter resigned at the same time. This was shortly
after the two bickering members quit. (They had also quit before and asked
to come back.) Are all volunteer organizations this ridiculous?

Because of things like that, I think, Slackware and Linux kernel projects
are living for so long and still are actively maintained/developed -
they both have "benevolent dictators" that prevent such quarrels.


So does BL, fortunately.

Karolis





Archive powered by MHonArc 2.6.24.

Top of Page