Booker Prize-winning author Ian McEwan pours fury on everyday item we all have in our homes: 'This is a derangement'
Popular TV series returns to Jimmy's Farm with filming underway
Mick Jagger, 82, and fiancée Melanie Hamrick, 38, reunite with the rocker's exes Bianca, 80, and Jerry Hall, 69, at star-studded British Museum Ball
Company that made power systems for servers didn’t know why its own machines ran out of juice
Who, Me? Each new Monday ushers in a week during which you might shine or flatline. The Register celebrates the times you end up doing the latter with a new instalment of Who, Me? It's the column in which you admit to making mistakes and execute cunning escapes.…
Representative Line: The Batch Managing Batch File
Carl was debugging a job management script. The first thing that caught his attention was that the script was called file.bat. They were running on Linux.
The second thing he noticed, was that the script was designed to manage up to 999 jobs, and needed to simply roll job count over once it exceeded 999- that is to say, job 1 comes after job 999.
Despite being called file.bat, it was in fact a Bash script, and thus did have access to the basic mathematical operations bash supports. So while this could have been done via some pretty basic arithmetic in Bash, doing entirely in Bash would have meant not using Awk. And if you know how to use Awk, why would you use anything but Awk?
njobno=`echo $jobno | awk '{if ($0<999) {print $0 + 1} else { print 1 }}'`As Carl writes: "I don't mind the desire to limit job count by way of mod(1000) but what an implementation!"
Bombshell development as mystery space junk that crashed in Australia is identified
Prestigious bakery 'absolutely thrilled' to be nominated for national award
Duchess Sophie proves a floral blouse isn't just for Spring at Monaco appearance - shop her exact shirt and see how she styled it for autumn
M25 live updates as multi-vehicle crash near Brentwood causes miles of delays
Surgeon reveals three types of workouts to reduce lower back pain
A humble church organist in rural Scotland had a dark secret... as Hitler's personal pianist
Could pension tax-free cash be slashed right away on Budget day? STEVE WEBB replies
Major update in case of young boy, 11, who died from a horrific snakebite after his dad sent him to bed because he thought he had been drinking
Britney Spears says she has 'brain damage' in bizarre post after ex-husband Kevin Federline's memoir bombshell
New Essex £254K skate park delayed due to 'wet weather'
Windows 11 Update Breaks Recovery Environment, Making USB Keyboards and Mice Unusable
Read more of this story at Slashdot.