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.

Suche Info´s bzw. Hilfe zu awk unter Unix

Empfohlene Antworten

Veröffentlicht

Salve,

hat einer von euch ein paar gute Links zu Seiten wo ich Info´s zu awk finde?

Wäre echt nicht Schlecht, denn meine Unterlagen geben nicht´s her und ich sollte hier mal das Script fertig coden....

Vielen Dank

Easy_FiSi

Versuchs mal mit The GNU Awk user's guide (~800kb HTML biggrin.gif)

Ansonsten Versuch es mit einer Suchmaschiene biggrin.gifbiggrin.gif

So hab mir die paar Seiten mal ausgedruckt...

Hab aber immer noch ein Problem. Vielleicht kann mir ja jemand von euch weiterhelfen.

Ziel: Ich will aus dem ls -Befehl die Größe aller Dateien summieren. Allerdings sollen Directories nicht mitgezählt werden....

Script:

variable=`ls -l | nawk '$1=!"??" {sum += $5}

END {print $5}'`

echo $variable

Frage:

Was muß ich anstelle von ?? eintragen damit er mir die Directories nicht mittzählt?

Danke im vorraus

Easy_FiSi

<BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">Zitat:</font><HR>Original erstellt von Easy_FiSi2001:

Script:

variable=`ls -l | nawk '$1=!"??" {sum += $5}

END {print $5}'`

echo $variable

Frage:

Was muß ich anstelle von ?? eintragen damit er mir die Directories nicht mittzählt?

Danke für deine schnelle Hilfe.

Allerdings haben wir inzwischen das Prob. auch gelöst :-)

variable=`ls -l | awk '$1 !~ /^d/ {sum += $5}

END {print sum}'`

echo $variable

Im Prinzip dasselbe nur andersrum *grins*

Grüße aus dem Süden

Easy_FiSi

[Dieser Beitrag wurde von Easy_FiSi2001 am 11. Oktober 2000 editiert.]

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.