[LUGOS] Zapis rezultata v spremenljivko
Borut Kurnik
borut.kurnik at add.si
Thu Oct 4 12:49:35 CEST 2001
Halo!
Moj prog je pac Sum, ki izpise npr. 'Sum = 55' (bash).
Varianta 1:
A=`java Sum | awk '{ print $3; }'`
echo $A
55
Varianta 2:
B=$(java Sum | awk '{ print $3; }')
echo $B
55
Borut
-----Original Message-----
From: Damjan Stritof [mailto:damjan at e5.ijs.si]
Sent: Thursday, October 04, 2001 12:30 PM
To: Lugos-List
Subject: [LUGOS] Zapis rezultata v spremenljivko
Hi.
Rad bi zapisal rezultat javanskega programa
./java -classpath
/usr/local/j2sdk1.3.0/jre/lib/rt.jar:/home/damjan/jar/upmadmin.jar upmadmin
| awk '{print $3}'
v okoljsko spremenljivko UPMADMIN_USERID.
Kaksna ideja? Hvala.
Lp,
Damjan
---
DAMJAN STRITOF, damjan at e5.ijs.si
"Jozef Stefan" Institute
Laboratory for Open Systems and Networks
More information about the lugos-list
mailing list