ML9.1 here.
When I type in a Konsole
 "cat /var/lock/subsys/dm"
no output is generated (dm containing the pid number of process prefdm)
to the Konsole.
But when I type
 "kill `cat /var/lock/subsys/dm"
the process is effectively killed.

I found this command in /etc/rc.d/init.d/dm:
" stop)
        gprintf "Stopping display manager: "
        if [ -r /var/lock/subsys/dm ]; then
            kill `cat /var/lock/subsys/dm` > /dev/null 2>&1
"

It took me a while to figure out that "cat" wouldn't print the content
of a file to the Konsole(standard output) if that content consist only
of a number. If that number is followed by a space in that file "cat"
shows "number " on the Konsole.
But if I type "cat /var/lock/subsys/dm > test.txt" the number is
copied to test.txt. And in the command "kill `cat /var/lock/subsys/dm"
the number is correctly presented to the "kill" command.

Why this behaviour for "cat" ? "info cat" gives me no clue.
Is this a bug of "cat" or some sort of feature ?

vatbier

Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to