Skip to content

Tag: linux

Text file is busy error from a shell script file

I am currently working on a project that writes and executes a shell script based on the input of the user. And I run the Shell file with this: But whenever the code executes the shell script, I get the error message: Text file is busy Answer All I had to do is close the file before executing it as

Grandchildren and Great-grandchildren of a process

I am trying to get the grandchildren and grand grandchildren PID’S of a certain PID that I pass as an argument. So, I am trying to find the simplest solution possible for a beginner. Now, I used pgrep -P $pid, to find the children of a certain PID, but now that I want to go even deeper, I think I

Renaming files in a directory based on an instructions file

I have a directory that regroups a .sql file and multiple data files. The .sql file contains an unload instructions for every .unl file the issue I have is that the names of the .unl files are not the same as the instructions on .sql. Usually the name should be TABLE_TABID.unl Im looking for a way to retreive…