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.

awk/sed Skript....Dringend!

Empfohlene Antworten

Veröffentlicht

Hallo ihr,

eine Textdatei ist folgendermaßen aufgebaut:

set raidtool(hotckpid) 0; # pid for hotspare checking process

set raidtool(tmpfile) $env(tmpfile); # set tmpfile from shell script

set raidtool(hc_retry) 2000; # cycle time [ms] for hotspare checking

set raidtool(hc_sleep) 5000; # sleep time [ms] between hotspare checking

set raidtool(guiupdate) 2000; # cycle time [ms] for gui update

set raidtool(raidtab) "/etc/raidtab"; # raid config file

set raidtool(mdstat) "/proc/mdstat"; # rait status 'file'

set raidtool(raidtab) "/root/raidtab"; # example config

set raidtool(mdstat) "/root/mdstat"; # example status

Und ich möchte, dass mir nur noch folgendes als Liste angezeigt wird:

$ABC(....) bzw.

set ABC(....)

Mit dem Awk geht das ja noch aber ich kapier nicht wozu ich den Sed hier brauchen sollte??? Kann mir mal bitte jemand erklären, warum das mit dem Sed einfacher funktionieren sollte? Und ob es nicht doch mit dem awk leichter zu realisieren ist?

Original geschrieben von Schlaubi

Hallo ihr,

eine Textdatei ist folgendermaßen aufgebaut:

set raidtool(hotckpid) 0; # pid for hotspare checking process

set raidtool(tmpfile) $env(tmpfile); # set tmpfile from shell script

set raidtool(hc_retry) 2000; # cycle time [ms] for hotspare checking

set raidtool(hc_sleep) 5000; # sleep time [ms] between hotspare checking

set raidtool(guiupdate) 2000; # cycle time [ms] for gui update

set raidtool(raidtab) "/etc/raidtab"; # raid config file

set raidtool(mdstat) "/proc/mdstat"; # rait status 'file'

set raidtool(raidtab) "/root/raidtab"; # example config

set raidtool(mdstat) "/root/mdstat"; # example status

Und ich möchte, dass mir nur noch folgendes als Liste angezeigt wird:

$ABC(....) bzw.

set ABC(....)

Mit dem Awk geht das ja noch aber ich kapier nicht wozu ich den Sed hier brauchen sollte??? Kann mir mal bitte jemand erklären, warum das mit dem Sed einfacher funktionieren sollte? Und ob es nicht doch mit dem awk leichter zu realisieren ist?

Hi gib mal bitte genauer an, was rauskommen soll, dann kann ich dir weiterhelfen (was inder Klammer etc....)

Gruß Sumpfbiber

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.