Reading the referers of this website, I found that someone reached it querying a search engine for
bash scripting validate file extension
I suppose they were looking for a script that, for example, when it finds a perl file, it is able to recognise it as such even if its extension is not pl.
Well, the following is my recipe for your Ferragosto Bash-becue
- Using your favourite language, populate an associative array with the strings that
file shows for the extensions that you are interested to map. Like:
php => PHP script text
pl => perl script text executable
- Within a Bash loop over the folder of your files:
- run
file against each file and save the string that it shows;
- using
awk, extract the extension of each file and look at the associative array: if the associated string is not the same that you have just found then the extension of your file is not validated.
- Don’t grill that much, please.
If you enjoyed this post, make sure you subscribe to my RSS feed!
Reading the referers of this website, I found that someone reached it querying a search engine for
hardware hacking geeks italian
There is not a test to pass to be referred to as a hardware hacker, it is mostly a question of notoriety so the following is a list of Italian friends who, at various levels of expertizing, can be called for hardware hacking challenges
If you enjoyed this post, make sure you subscribe to my RSS feed!
This is a reminder for me: I’ve just placed on this website the trivial patch for the Now Reading plugin that I’ve written to fit my needs.
If you enjoyed this post, make sure you subscribe to my RSS feed!
This is a reminder for me: I’ve just placed on this website the trivial patch for the Fluid Blue theme that I’ve written to fit my needs.
If you enjoyed this post, make sure you subscribe to my RSS feed!
In the last few months, I have been looking for a novel written by a contemporary English writer whose prose would be both easy and refined: then some days ago a British friend suggested reading “An Artist of the Floating World” written by Kazuo Ishiguro. He was born in Japan in 1954 and he left it around the age of six to move to the United Kingdom so he can undoubtedly be referred to as a British novelist.
It seems that “The Sunday Times” has described this book as “A work of spare elegance” so, even before starting it, I was sure that it would have been quite close to what I was searching for. Reading it, I’ve increasingly understood that it is a masterpiece, though my opinion is irrilevant.
I do not want to summarize here the story that it tells: I just want to say that what remains at the end of it is the importance of trying to elevate from the mediocrity in which a life can fall and to limit the arrogance that prevents us from recognising our faults. I would like to write more about two parts of it but I don’t want to block my readers from the delight of their own reading so I’ll just close this post quoting a sentence that Ishiguro has written to describe the landscape of Nagasaki, still wasted during the first few years after the end of the Second World War:
(…) you may see the line of old telegraph poles - still without wires to connect them - disappearing into the gloom down the route you have just come, and you may be able to make out the dark clusters of birds perched uncomfortably on the tops of the poles, as though awaiting the wires along which they once lined the sky.
If you enjoyed this post, make sure you subscribe to my RSS feed!
Yes, like Candide, we’ve learnt that we do not live in the “best of all possible worlds”: there are so many PCs seduced by dark sided OSes that we have to deal with them… because, as I’ve already written, customers, friends and relatives use them.
This book might help you when the problem that you are trying to solve is certainly not obvious: it covers in detail most OS internals that, in a few cases, would be better referred to as bowels.
The author doesn’t hesitate to use perl or other tools coming from the correct side so, even if you do not use the OS that this book evokes, you won’t feel completely lost. 
If you enjoyed this post, make sure you subscribe to my RSS feed!
Ho deciso di apportare il mio contributo al recente florilegio di frizzi e lazzi sul parlamentare più “in tiro” del momento con una freddura di grana grossa:
Il colmo per l’On. Mele? Non resistere ad un paio di pere.
If you enjoyed this post, make sure you subscribe to my RSS feed!