Linux 14.982 Themen, 106.346 Beiträge

bei gxine start script ausführen und beim beenden

zyklop66 / 4 Antworten / Flachansicht Nickles

Ja hallo

ich würde bezüglich der flackernden wiedergabe wenn compiz läuft gern wenn gxine startet ein deaktivierungsscript ausführen und beim beenden eins zum reaktivieren,meine frage ist wie jubel ich diese jetzt gxine unter,die scripte sind schon fertig.

wär nett falls das jemand weiß?

Ein gutes Leben,ist die beste Rache!!!
bei Antwort benachrichtigen
KarstenW zyklop66 „bei gxine start script ausführen und beim beenden“
Optionen

Du kannst ein script in einem anderen script mit "source" einfügen, ohne den Programmtext einzufügen:

http://www.tldp.org/LDP/abs/html/

"source, . (dot command)

This command, when invoked from the command line, executes a script. Within a script, a source file-name loads the file file-name. Sourcing a file (dot-command) imports code into the script, appending to the script (same effect as the #include directive in a C program). The net result is the same as if the "sourced" lines of code were physically present in the body of the script. This is useful in situations when multiple scripts use a common data file or function library.

Example 14-22. "Including" a data file

#!/bin/bash

. data-file # Load a data file.
# Same effect as "source data-file", but more portable.

# The file "data-file" must be present in current working directory,
#+ since it is referred to by its 'basename'.

# Now, reference some data from that file.

echo "variable1 (from data-file) = $variable1"
echo "variable3 (from data-file) = $variable3"

let "sum = $variable2 + $variable4"
echo "Sum of variable2 + variable4 (from data-file) = $sum"
echo "message1 (from data-file) is \"$message1\""
# Note: escaped quotes

print_message This is the message-print function in the data-file.


exit 0

"


http://www.tldp.org/LDP/abs/html/internal.html#SELFSOURCE


Oder was meinst du ?


PS: Das ist ein gutes Buch über Shellprogrammierung:

Shell-Programmierung
Das umfassende Handbuch
Jürgen Wolf

Galileo Computing
804 S., 2., aktualisierte und erweiterte Auflage 2008, geb., mit DVD
39,90 Euro, ISBN 978-3-8362-1157-4

http://www.galileocomputing.de/katalog/buecher/titel/gp/titelID-1712?GalileoSession=39899573A3.hS9I6E.g

Debian GNU/Linux https://www.debian.org/index.de.html
bei Antwort benachrichtigen