Clock
Benjamin Meyer
ben at meyerhome.net
Fri Jun 27 10:57:57 BST 2003
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Friday 27 June 2003 5:40 am, David Faure wrote:
> On Friday 27 June 2003 11:34, Benjamin Meyer wrote:
> > Id=KDE3.2
> > Script=" \
> > #!/bin/sh \
> > config_dir=~/.kde/share/config/ \
>
> This hardcoded path should rather be
> kde-config --path config | sed -e 's/:.*//'
>
> > for pkg in `find $config_dir -name 'clock_panelapplet_*' -maxdepth 1 |
> > sort`;
>
> Hum, isn't "ls -1 clock_panelapplet_*" simpler?
>
> > do \
> > filename=`basename $pkg` \
> > sed 's/Tyle=Plain/Type=0/' filename \
> > sed 's/Tyle=Digital/Type=1/' filename \
> > sed 's/Tyle=Analog/Type=2/' filename \
> > sed 's/Tyle=Fuzzy/Type=3/' filename \
>
> sed doesn't work that way... Is it ok to use perl -pi -e?
> Otherwise you need to redirect the output of sed to a new file (e.g.
> filename.tmp)... Combine all the s/foo/bar/ using ";" between them. Use $
> before filename ;) Then mv -f $filename.tmp $filename.
I have never really learned much in the way of shell scripting and never (some
would say happily while others scornfully) touched perl. Any and all
suggestions are welcome and wanted.
- -Benjamin Meyer
- --
Public Key: http://www.csh.rit.edu/~benjamin/public_key.asc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE+/BUl1rZ3LTw38vIRAsygAKCXW/hNgd/+ZCaE+CzIdv0Vl+LKMwCeIG5M
hKNTeafBBx6XmzijoyD9ZwY=
=bByo
-----END PGP SIGNATURE-----
More information about the kde-core-devel
mailing list