[phpBB Debug] PHP Notice: in file /viewtopic.php on line 981: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 981: getdate(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead
Tynsoe Projects • View topic - Shell script works in 10.8.5 but not in 10.9.5

Shell script works in 10.8.5 but not in 10.9.5

Shell script works in 10.8.5 but not in 10.9.5

Postby chromatic » Mon Oct 13, 2014 10:58 am

- Could you help me figure out if there's anything in these lines of code that wouldn't run properly on 10.9.5?

Hi! I have a Portal 2 themed thing going on which I made with a lot of help two years ago. I haven't used it and just today thought I'd give it a try on my old computer. I used to run the script on this computer, so I know it shooould read the CPU and RAM correctly, but the Memory reading is completely blank. The only thing that has changed since being able to work is that I upgraded geektools to the latest version, 3.1.1, I've got a new graphics card, and I run OS 10.9.5. I'm going to guess that's it's the OS that's the culprit since I can run the geeklets with 3.1.1 on another computer still on 10.8.5.

- Could you help me figure out if there's anything in these lines of code that wouldn't run properly on 10.9.5?
If you're curious to what the code does: it should get the Memory, represent it as a letter from A-Y, which I've made a special font for so it show it as a progress bar as seen here - https://i.imgur.com/JgbdVZb.jpg


mUSED=`top -l 1 | grep PhysMem: | awk '{print $8}'`
mFREE=`top -l 1 | grep PhysMem: | awk '{print $10}'`
G="G"
M="M"
if [ `echo ${mUSED: -1:1}` = `echo ${mFREE: -1:1}` ]
then
USED=`top -l 1 | grep PhysMem: | awk '{print "X"int($8/($8+$10)*50)"X"}'`
else
if [ `echo ${mUSED: -1:1}` = $M -a `echo ${mFREE: -1:1}` = $G ]
then
USED=`top -l 1 | grep PhysMem: | awk '{print "X"int($8/($8+$10*1000)*50)"X"}'`
else
USED=`top -l 1 | grep PhysMem: | awk '{print "X"int(($8*1000)/($8*1000+$10)*50)"X"}'`
fi
fi
echo $USED | sed "s/X0X/a/;s/X1X/b/;s/X2X/c/;s/X3X/d/;s/X4X/e/;s/X5X/f/;s/X6X/g/;s/X7X/h/;s/X8X/i/;s/X9X/j/;s/X10X/k/;s/X11X/l/;s/X12X/m/;s/X13X/n/;s/X14X/o/;s/X15X/p/;s/X16X/q/;s/X17X/r/;s/X18X/s/;s/X19X/t/;s/X20X/u/;s/X21X/v/;s/X22X/w/;s/X23X/x/;s/X24X/y/;s/X25X/z/;s/X26X/A/;s/X27X/B/;s/X28X/C/;s/X29X/D/;s/X30X/E/;s/X31X/F/;s/X32X/G/;s/X33X/H/;s/X34X/I/;s/X35X/J/;s/X36X/K/;s/X37X/L/;s/X38X/M/;s/X39X/N/;s/X40X/O/;s/X41X/P/;s/X42X/Q/;s/X43X/R/;s/X44X/S/;s/X45X/T/;s/X46X/U/;s/X47X/V/;s/X48X/W/;s/X49X/X/;s/X50X/Y/"
chromatic
 
Posts: 1
Joined: Mon Oct 13, 2014 10:43 am

Return to GeekTool

Who is online

Users browsing this forum: No registered users and 9 guests

cron