Zitat von linuxopa am 7. Juli 2025, 8:14 Uhrerstelle script (z.B. pcd):
cd $(dirname `which $1`)
chmod +x pcd
# Script muß natürlich erreichbar sein, z.B. über PATH #
# Punkt sowie Leerzeichen sind notwendig #
Aufruf:
opa@opa:~$ cdp firefoxErgebnis:
opa@opa:/usr/local/bin$
erstelle script (z.B. pcd):
cd $(dirname `which $1`)
chmod +x pcd
# Script muß natürlich erreichbar sein, z.B. über PATH #
# Punkt sowie Leerzeichen sind notwendig #
Aufruf:
opa@opa:~$ cdp firefox
Ergebnis:
opa@opa:/usr/local/bin$