Search Results

Search: Posts Made By: wisecracker
Forum: OS X (Apple) 12-12-2018
50,788
Posted By wisecracker
Hi Corona688... This edge case works on my...
Hi Corona688...

This edge case works on my version...
I have limited my decimal point to 9 decimal places BUT note the non-zero digits start at the 10th decimal place:
Last login: Wed Dec 12...
Forum: OS X (Apple) 11-23-2018
50,788
Posted By wisecracker
Apologies for the delay, I am a carer or...
Apologies for the delay, I am a carer or babysitter presently for my mother or grandchild and dogs.
However @ Corona688...

Well tested your 'BASH' version with just one edge case and there will...
Forum: OS X (Apple) 11-07-2018
50,788
Posted By wisecracker
Hi MadeInGermany... I was well aware of...
Hi MadeInGermany...

I was well aware of 'IFS' being permanent but the test code was proof of concept rather than a dedicated program.
If C688 had not mentioned the heredoc method then then I...
Forum: OS X (Apple) 11-07-2018
50,788
Posted By wisecracker
Hi Corona688... #!/usr/local/bin/dash #...
Hi Corona688...


#!/usr/local/bin/dash
# heredoc.sh
IFS="$IFS"'.'

read -r INT FLOAT <<EOF
$1
EOF
echo "$INT $FLOAT"
WOW! I didn't find anything about this on the mighty WWW. This earns...
Forum: OS X (Apple) 11-06-2018
50,788
Posted By wisecracker
I can see what you are doing, but forgive my...
I can see what you are doing, but forgive my ignorance; apart from the obvious bashisms, how do I use 'read' to input values directly from command line arguments without disk thrashing in POSIX...
Forum: OS X (Apple) 11-06-2018
50,788
Posted By wisecracker
I wouldn't know where to start for floating point...
I wouldn't know where to start for floating point maths in pure 'dash' and I'll stick my neck out and say it cannot be done at all.

I don't use "%f" anywhere, I use "%.f" instead and 'shellcheck'...
Forum: OS X (Apple) 11-06-2018
50,788
Posted By wisecracker
OSX 10.13.6, default bash terminal. NOTE: These...
OSX 10.13.6, default bash terminal.
NOTE: These shells are of a vintage that Apple thinks is OK!

Well guys, have I found a bug?
Last login: Tue Nov 6 13:15:41 on ttys000
AMIGA:amiga~> cd...
Forum: OS X (Apple) 11-05-2018
50,788
Posted By wisecracker
A fixed point basic calculator for DASH.
This exercise has taught me a lot about POSIX, dash and their limits.

I decided to experiment with fixed point arithmetic using dash as the shell.
If you want to test it then change the shebang...
Showing results 1 to 8 of 8

 
All times are GMT -4. The time now is 05:30 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy