≡ Menu

Uncategorized

Question - I need to check if a directory is empty in a bash shell script. Is there a Linux command that I can use to do this? The following code with check if a directory is empty in a bash shell script: The above code will check if the directory /root is empty. If [...]

{ 0 comments }

How to differentiate between 0 and FALSE in PHP?

The question - In my PHP script, I need a way to differentiate between 0 and FALSE. Is there a way to do that? First, the problem description: The problem is that PHP considers FALSE to be 0 and TRUE to be 1. So the following code will not work: The problem with the above [...]

{ 0 comments }

Linux – Bad Interpreter: Text File Busy

In one of my Perl scripts, I get the error - bad interpreter: text file busy. How to solve this error? This happens either if your Perl script is open for writing somewhere else by you or by another user, or if Perl itself is being updated. If the former, you can just find who [...]

{ 0 comments }