[comp.windows.x] twm: shell commands

harkcom@potato.pa.Yokogawa.CO.JP (Alton Harkcom) (06/01/90)

A question...

	I am trying to create a function in twm to purge my home directory of
all those nasty little autodumps(?) and baks(?) that emacs creates. I know I
could just turn off those features, but they are useful and I sometimes need
them. However, after I've romped through my directory and created a few megs
of these droppings, I want to flush them away. I could do it with an alias or
as a lisp file in emacs, but I want to do it using the function keys. I created
a binding to F1 for the following function...

Function "clean-directories"
{
	!"find ~ -name \"*~\" -exec rm {} \;"
	!"find ~ -name \".*~\" -exec rm {} \;"
	!"find ~ -name \"#*#\" -exec rm {} \;"
}

However, twm eats the quotation marks in the middle of the string...

The commands that appear are {find ~ -name *~ -exec rm {} ;} etc...

I need {find ~ -name "*~" -exec rm {} ;}...

	I am also trying to use other functions which have the same problem.
This is the one that is easiest to explain so I chose it. If anybody knows
how to use quotation marks inside of a shell command in twm, please let me
e-mail suggestions to me. I will summarize and post any good ideas I receive.

	I also get an error when I use f.exec "string", but when I use
!"string" the shell command works. ie. f.exec "echo testing" crashes whereas
!"echo testing" works fine...

	Any other information or maybe even some sample functions would be
great. If anybody is willing to drop me a copy of theirs I'll post a summary.

Thanks in advance...

--
--harkcom@potato.pa.yokogawa.co.jp