chewmanfoo
Members-
Content count
8 -
Joined
-
Last visited
Never
Everything posted by chewmanfoo
-
Shell Scripting Exercise: count physical RAM in MB
chewmanfoo posted a topic in Linux Customization & Tweaking
Guys, I'm writing a series of scripts for deploying in our support center. One that I'm working on involves /proc/kcore, the physical RAM of a linux system. I'm trying to display the amount of physical RAM in a system by returning the size of this file divided by 1024. I'd like it to eventually say: PHYSICAL RAM: 512MB. Here's what I've tried, and the results: Code: $ echo "System RAM";ls -l /proc/kcoreSystem RAM-r-------- 1 root root 958595072 Feb 14 13:13 /proc/kcore$ $ ls -l /proc/kcore | 'expr $5/1024'/bin/ksh: expr $5/1024: not found$ ls -l /proc/kcore | echo $5$ ls -l /proc/kcore | echo $1$ ls -l /proc/kcore > echo $5/bin/ksh: cannot create echo: No such file or directory$ ls -l /proc/kcore | awk "print int($5/1024)"awk: cmd. line:1: print int(/1024)awk: cmd. line:1: ^ parse errorawk: cmd. line:1: print int(/1024)awk: cmd. line:1: ^ unterminated regexpawk: cmd. line:2: print int(/1024)awk: cmd. line:2: ^ unexpected newline$ ls -l /proc/kcore | awk {print int($5/1024)}/bin/ksh: syntax error: `(' unexpected$ ls -l /proc/kcore | awk `BEGIN {print int($5/1024)}'> > ^C$ $ ls -l /proc/kcore | awk `{print int($5/1024)}`/bin/ksh: syntax error: `(' unexpected$ ls -l /proc/kcore | awk -F `{print int($5/1024)}'> > ^C$ ls -l /proc/kcore | awk -F `{print int($5/1024)}'> ^C$ awk '{ print int($5/1024) }` < ls -l /proc/kcore> ^C$ ls -l /proc/kcore > temp; awk '{ print int($5/1024) }` temp> ^C As you can see, I'm stuck on awk. Can anyone shed some light on this? I basically want to take the 5th field of an ls and display the result of that field divided by 1024. Anyone? TIA! chewy -
Is it me, or does the display of mozilla 1.4.1 that came with my Fedora 1 look smoother - characters less pixellized? I'm sure of it! Somehow, the fonts are easier on the eyes. I installed mozilla 1.6, the browser is wonderful, but the fonts are jagged and look like crap. What am I doing wrong? TIA! chewy
-
Is anyone running Fedora on Athlon64 with nForce3? Are there anyone running Fedora on it? Are you able to report good things, or has install been a bother? I'm just curious. I think that's the platform to get into and I'm gonna buy soon, so any info would be helpful. TIA Chewy
-
Shell Scripting Exercise: count physical RAM in MB
chewmanfoo replied to chewmanfoo's topic in Linux Customization & Tweaking
Yeah, but all variables in the shell are strings. That's why you can't say: Code: $x = 5$x = $x + 1echo $x expr returns the numeric (integer) value of an expression, like "$x + 1" But I still don't understand why this doesn't work... help? -
Visual C++? I want you to march into that classroom and punch your professor right in the face! Anyway, yeah, look into Qt and Java. C++ is stoneage, man. Java is where it's at. I promise if you get to working with Netbeans (http://www.netbeans.org), you won't go back. chewy[/url]
-
smoothe fonts on Fedora 1 and mozilla
chewmanfoo replied to chewmanfoo's topic in Linux Customization & Tweaking
I'm referring to Fedora Core 1 (yarrow). Anybody know what causes this? -
Whoa, I've never seen this before in such a modern os: [root@localhost opt]# mount /mnt/winNTFSmed mount: fs type ntfs not supported by kernel here's fstab: LABEL=/ / ext3 defaults 1 1 LABEL=/boot /boot ext3 defaults 1 2 none /dev/pts devpts gid=5,mode=620 0 0 none /proc proc defaults 0 0 none /dev/shm tmpfs defaults 0 0 /dev/hda9 swap swap defaults 0 0 /dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0 /dev/cdrom1 /mnt/cdrom1 udf,iso9660 noauto,owner,kudzu,ro 0 0 /dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0 /dev/hda1 /mnt/winNTFS ntfs defaults 0 0 /dev/hda2 /mnt/winNTFS2 ntfs defaults 0 0 /dev/hda3 /mnt/winNTFS3 ntfs defaults 0 0 /dev/hdb1 /mnt/winNTFSmed ntfs defaults 0 0 am I doing something wrong? All my windows partitions are NTFS!!?!! Help! chewy Oh, and TIA!
-
Try fedora. Very fast, very fast. Comes with 3d-support on my Radeon 8500! Mandrake was slow on this system... chewy