Modify

Opened 2 hours ago

Last modified 22 minutes ago

#23951 new defect

Startup Shell Script Warning

Reported by: pch13@… Owned by: team
Priority: normal Milestone:
Component: Core Version: tested
Keywords: Linux Cc: sebastic

Description

When I start JOSM in a terminal I see this error/warning message:

/usr/bin/josm: Zeile 61: [: : Ganzzahliger Ausdruck erwartet.

The script in line 61 wants an integer but got something different. I run the code there manually:

$ free --mega
              gesamt      belegt       frei     gemeinsam    Zwischen   verfügbar
Speicher:       16643        8531         484         882        7627        6885

It might work like this:

$ LANG=C free --mega
              total        used        free      shared  buff/cache   available
Mem:          16643        8533         488         876        7621        6890

Running JOSM/1.5 (19230 de) Linux Ubuntu 20.04.6 LTS

Attachments (0)

Change History (1)

comment:1 by skyper, 23 minutes ago

Cc: sebastic added
Keywords: Linux added
Version: tested

See r19215.
So following does only work with system language set to English or C.

# If there is more than 8G ram, we can use up to 75% of the memory while still leaving 2G for other things.
if [ "$(free --mega | grep '^Mem:' | awk '{print $2}')" -gt 8192 ];

Maybe, reading directly from /proc like cat /proc/meminfo is system language independent.

Last edited 22 minutes ago by skyper (previous) (diff)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from team to the specified user.
Next status will be 'needinfo'. The owner will be changed from team to pch13@….
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from team to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.