Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: wisecracker
Forum: OS X (Apple) 01-20-2020
5,687
Posted By wisecracker
Hi MadeInGermany... Although there is a...
Hi MadeInGermany...
Although there is a workaround this is an edge case:
#!/usr/local/bin/dash
# lead_zeros.sh

# This is a gotcha...
# There will always be 6 zeros sooner or later, 000000.
...
Forum: OS X (Apple) 01-19-2020
5,687
Posted By wisecracker
Well the C source does not compile on a current...
Well the C source does not compile on a current update, 19-01-2020, Linux Mint 19 using gcc 7.4.0 so here is a completely simplified and modified version for gcc 4.2.1 and 7.4.0...
The printf ...
Forum: OS X (Apple) 01-19-2020
5,687
Posted By wisecracker
As the clock is very quickly cycling inside the...
As the clock is very quickly cycling inside the microsecond part there is always a possibility of these values '00000' to '09999' occurring. These are obviously NOT octal but decimal with leading...
Forum: OS X (Apple) 01-18-2020
5,687
Posted By wisecracker
Generate a random number in a fully POSIX compliant shell, 'dash'...
Hi all...
Apologies for any typos, etc...
This took a while but it didn't beat me...

Although there are many methods of generating random numbers in a POSIX shell this uses integer maths and a...
Showing results 1 to 4 of 4

 

Featured Tech Videos

All times are GMT -4. The time now is 11:19 PM.
Unix & Linux Forums Content Copyright 1993-2020. All Rights Reserved.
Privacy Policy