Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
comando time e problemi bash [risolto]
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian)
View previous topic :: View next topic  
Author Message
Elbryan
Guru
Guru


Joined: 13 Nov 2006
Posts: 523
Location: Rovereto (TN)

PostPosted: Wed Dec 05, 2007 1:35 pm    Post subject: comando time e problemi bash [risolto] Reply with quote

M'è successa una cosa strana:

Code:

silverbox banco di prova # time --output=time.txt java -jar Elak.jar < input
bash: --output=time.txt: command not found

real    0m0.002s
user    0m0.000s
sys     0m0.000s


e..

Code:

silverbox banco di prova # time --version
bash: --version: command not found

real    0m0.001s
user    0m0.000s
sys     0m0.000s


A quanto pare la bash non riesce a fare il parse corretto del comando. Come mai? 8O


Last edited by Elbryan on Wed Dec 05, 2007 4:16 pm; edited 1 time in total
Back to top
View user's profile Send private message
randomaze
Bodhisattva
Bodhisattva


Joined: 21 Oct 2003
Posts: 9985

PostPosted: Wed Dec 05, 2007 2:09 pm    Post subject: Re: comando time e problemi bash Reply with quote

Elbryan wrote:
M'è successa una cosa strana:


Sei sicuro che time supporti l'opzione che gli stai passando?

Suggerisco:
Code:
man time

_________________
Ciao da me!
Back to top
View user's profile Send private message
Elbryan
Guru
Guru


Joined: 13 Nov 2006
Posts: 523
Location: Rovereto (TN)

PostPosted: Wed Dec 05, 2007 2:17 pm    Post subject: Reply with quote

Code:

...
   GNU Options
       -f FORMAT, --format=FORMAT
              Specify output format, possibly overriding the format  specified
              in the environment variable TIME.

       -p, --portability
              Use the portable output format.

       -o FILE, --output=FILE
              Do  not  send the results to stderr, but overwrite the specified
              file.

...
       -V, --version
              Print version information on standard output, then exit success-
              fully.

mm.. direi di sì.

Code:

elbryan@silverbox ~ $ time -V
bash: -V: command not found

real    0m0.001s
user    0m0.000s
sys     0m0.000s
Back to top
View user's profile Send private message
randomaze
Bodhisattva
Bodhisattva


Joined: 21 Oct 2003
Posts: 9985

PostPosted: Wed Dec 05, 2007 2:27 pm    Post subject: Reply with quote

Elbryan wrote:
mm.. direi di sì.


Allora riprova bypassando alias e comandi interni di bash:
Code:
/usr/bin/time --version

_________________
Ciao da me!
Back to top
View user's profile Send private message
Elbryan
Guru
Guru


Joined: 13 Nov 2006
Posts: 523
Location: Rovereto (TN)

PostPosted: Wed Dec 05, 2007 2:37 pm    Post subject: Reply with quote

randomaze wrote:
Elbryan wrote:
mm.. direi di sì.


Allora riprova bypassando alias e comandi interni di bash:
Code:
/usr/bin/time --version


Il problema è che il comando time proprio non lo trovo!
Code:

elbryan@silverbox ~ $ ls /usr/bin/ | grep -i time
fttimer
jack_showtime
scons-time
scons-time-0.97
time-admin
uptime


e anche facendo un locate..
Code:

silverbox elbryan # updatedb
silverbox elbryan # locate -b '\time'
/usr/portage/app-xemacs/time
/usr/portage/dev-haskell/time
/usr/portage/sys-process/time
/usr/share/irssi/help/time
/usr/src/linux-2.6.22-gentoo-r8/kernel/time
/usr/src/linux-2.6.22-suspend2-r2/kernel/time
/usr/src/linux-2.6.23-tuxonice-r2/kernel/time
/var/cache/setup-tool-backends/backup/time
/var/cache/setup-tool-backends/debug/time
Back to top
View user's profile Send private message
randomaze
Bodhisattva
Bodhisattva


Joined: 21 Oct 2003
Posts: 9985

PostPosted: Wed Dec 05, 2007 3:14 pm    Post subject: Reply with quote

Elbryan wrote:
Il problema è che il comando time proprio non lo trovo!


prova con eix o direttamente con emege (sys-process/time) :roll:
_________________
Ciao da me!
Back to top
View user's profile Send private message
MeMyselfAndI
l33t
l33t


Joined: 15 Nov 2005
Posts: 784
Location: Between the monitor and the chair

PostPosted: Wed Dec 05, 2007 3:27 pm    Post subject: Reply with quote

randomaze wrote:
Elbryan wrote:
Il problema è che il comando time proprio non lo trovo!


prova con eix o direttamente con emege (sys-process/time) :roll:


uhmmm
Code:

 root [16:25:55] / # eix ^time$

* sys-process/time
     Available versions:  1.7-r1
     Homepage:            http://www.gnu.org/directory/time.html
     Description:         displays info about resources used by a program



Code:

 root [16:26:12] / # time

real    0m0.000s
user    0m0.000s
sys     0m0.000s


Programma fantasma ?
Back to top
View user's profile Send private message
Elbryan
Guru
Guru


Joined: 13 Nov 2006
Posts: 523
Location: Rovereto (TN)

PostPosted: Wed Dec 05, 2007 3:32 pm    Post subject: Reply with quote

infatti, non capisco nemmeno io sta cosa..

edit: ho emerso sys-process/time ma non cambia nulla, stesso problema.
Back to top
View user's profile Send private message
MeMyselfAndI
l33t
l33t


Joined: 15 Nov 2005
Posts: 784
Location: Between the monitor and the chair

PostPosted: Wed Dec 05, 2007 3:35 pm    Post subject: Reply with quote

potrebbe essere una funziona interna di bash... se guardi man bash ci sono parecchi riferimenti.... probabilmente la pagina man time si riferisce al pacchetto sys-process e non alla funzione di bash.
Ma sono solo congetture, non so se e' realmente cosi'!
Back to top
View user's profile Send private message
Elbryan
Guru
Guru


Joined: 13 Nov 2006
Posts: 523
Location: Rovereto (TN)

PostPosted: Wed Dec 05, 2007 3:39 pm    Post subject: Reply with quote

MeMyselfAndI wrote:
potrebbe essere una funziona interna di bash... se guardi man bash ci sono parecchi riferimenti.... probabilmente la pagina man time si riferisce al pacchetto sys-process e non alla funzione di bash.
Ma sono solo congetture, non so se e' realmente cosi'!


ho provato a lanciarlo anche da sh ma il problema non cambia.
Voi time -V lo esegue correttamente?
Back to top
View user's profile Send private message
MeMyselfAndI
l33t
l33t


Joined: 15 Nov 2005
Posts: 784
Location: Between the monitor and the chair

PostPosted: Wed Dec 05, 2007 4:01 pm    Post subject: Reply with quote

Nella reference guide e' scritto che time e' diventata una "shell reserved word". Detto cio' si spiegano tutti i problemi.

Se hai installato sys-process/time devi lanciarlo con il path completo, oppure verra' sempre eseguito il time di bash.
Code:

/usr/bin/time -V

funziona correttamente.

Ciao
Back to top
View user's profile Send private message
Elbryan
Guru
Guru


Joined: 13 Nov 2006
Posts: 523
Location: Rovereto (TN)

PostPosted: Wed Dec 05, 2007 4:16 pm    Post subject: Reply with quote

Ah ok, allora risolto questo dilemma.. :)

Grazie per l'explain.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum