• Willkommen im Linux Club - dem deutschsprachigen Supportforum für GNU/Linux. Registriere dich kostenlos, um alle Inhalte zu sehen und Fragen zu stellen.

Formatierung von Variablenausgaben

Hi,

habe folgendes Problem. In einem Script führe ich ein Anweisung aus, das Ergebnis wird in einer VAriablen gespeichert. Anschliessend möchte ich die Variable mit echo ausgeben allerdings formatiert, was nicht funktioniert. Bei Ausgabe in eine DAtei funktioniert es.

Also Beispiel mit Variable:

$ x=`ls -la hs*`
$ echo $x
-rw-r--r-- 1 oracle oinstall 7492 2005-12-21 14:03 hs_err_pid1233.log -rw-r--r-- 1 oracle oinstall 7492 2005-12-21 09:57 hs_err_pid2456.log -rw-r--r-- 1 oracle oinstall 7808 2005-12-14 14:52 hs_err_pid25919.log -rw-r--r-- 1 oracle oinstall 7492 2005-12-14 23:07 hs_err_pid2679.log -rw-r--r-- 1 oracle oinstall 7323 2005-12-14 23:07 hs_err_pid2967.log -rw-r--r-- 1 oracle oinstall 7977 2005-12-14 14:30 hs_err_pid30492.log

Beispiel mit DAtei

$ ls -la hs* > datei

$ cat datei
-rw-r--r-- 1 oracle oinstall 7492 2005-12-21 14:03 hs_err_pid1233.log
-rw-r--r-- 1 oracle oinstall 7492 2005-12-21 09:57 hs_err_pid2456.log
-rw-r--r-- 1 oracle oinstall 7808 2005-12-14 14:52 hs_err_pid25919.log
-rw-r--r-- 1 oracle oinstall 7492 2005-12-14 23:07 hs_err_pid2679.log
-rw-r--r-- 1 oracle oinstall 7323 2005-12-14 23:07 hs_err_pid2967.log
-rw-r--r-- 1 oracle oinstall 7977 2005-12-14 14:30 hs_err_pid30492.log


Hat jemand ne Idee wie ich auch aus einer Variablen formatiert ausgeben kann ??


Danke Engelbert
 
Oben