Two issues, removing the decimal places and appending a character.
Trying to generate a /dev/shm line in /etc/fstab that is set to 1G less than available RAM.
The line should appear as follows in /etc/fstab:
...
none /dev/shm tmpfs rw,exec,size=2048M 0 0
...
1) How do I convert something like this to integer? The floating point fails
$shm_size = $memorysize_mb - 1024
2) Used file_line to insert the string in /etc/fstab. How do I append the M to the $shm_size variable without a space between?
line => 'none /dev/shm tmpfs rw,exec,size=$shm_sizeM 0 0'
Thanks,
Bob