Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Neus Bash-Script erstellen

Empfohlene Antworten

Hallo Forum,

ich hab ne Mail bekommen von einem Kumpel die mir die Lösung eines Problems bietet:


#!/usr/local/bin/bash


for i in `find /raid0 -type d -name 'layouts'` ; do


# damit er nicht die, die schon in Layouts_Sammler sind, nochmal kopiert

[[ $i == /raid0/Layouts_Sammler/* ]] && continue;


# kopieren und nummerieren

cp -r $i /raid0/Layouts_Sammler/`echo $i | cksum | cut -d' ' -f1`


done

Dieses soll auf einer Solaris 9.0 Maschine ausgeführt werden mittels Bash-Script.

Wie muss ich vorgehen ein Bash-Script zu erstellen und dieses ausführen?

THX

Bundygirl

du kopierst den text in eine "normale" ascii-text-datei und machst selbige ausführbar.

et voila. es läuft ;)

du kopierst den text in eine "normale" ascii-text-datei und machst selbige ausführbar.

et voila. es läuft ;)

Und wie mache ich sie ausführbar?

Ich hab von unix/linux nicht wirklich Ahnung ;-)

chmod a+x dateiname

Danke danke danke :-)

Hab jetzt nochmal ne Frage

die Datei kann nicht ausgeführt werden!

Muss sie in einem Bestimmten Verzeichnis liegen?

ich hab sie jetzt mal in /tmp/test/ gesichert.

das kommt auf die erweiterung an, .sh dateien können direkt ausgeführt werden, wenn sie das recht dazu haben. andernfalls muss sie als parameter der shell übergeben werden.

> sh datei

oder

> datei.sh

s'Amstel

Und da (zumindest bei Linux) die Kommandozeile erst in den Path Verzeichnissen schaut.. musst du entweder die Absolute Pfadangabe uebergeben zum Starten.. oder aber

./foo.sh

;)

Gut es klappt

Danke an euch alle :-)

@Amstelchen:

die dateiendung ist doch bei einer korrekten Shebang-Zeile völlig egal.

Oder ist das bei Solaris nicht so?

jopp, ist egal, muss nur ausfuehrbar sein :cool:

...warum direkt ausgeführt werden?? Linux/Unix ist doch die Dateierweiterung völlig egal - zumindest in der Kommandozeile, da wechselt man einfacherweise in das Verzeichnis, indem die (ausführbare) Datei liegt und tippt dann ./dateiname

Nachtrag: Ups sorry man sollte seine Seite auch mal aktualisieren *schäm*

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.