Skip to content

bash if elif statement always prints first value

For some reason, the first value is always printed. I can’t figure out the reason behind it. Any ideas? I tried many things including single =, single [] but nothing seems to be working at all. Answer You need to add whitespace to the conditions:

blast could not create a unit counts container

I build a blast local database. However, when I run the blastn command I got this error message: T0 “/home/coremake/release_build/build/PrepareRelease_Linux64-Centos_JSID_01_250088_130.14.22.10_9008__PrepareRelease_Linux64-Centos_1448906370/c++/compilers/unix/../../src/algo/winmask/seq_masker_istat_fact…

C Shell to execute commands

I have the following code: The programme works fine, however when I parse something like “ps -f” it retunrs “execvp echoué”, as the code removes the spaces. What should I exactly do to make it accept comands with options such as ps -f? Answer You should use fgets() instead of scanf(). …

Move all files at one level up one level

I had a problem with a backup on a linux server that somehow moved all folders of files down one level into a new folder with the same name. I would like to return all files to their original location. Many of the files have spaces in their names to complicate things. Original directory structure: Incorrect d…

Invoking subshells from script does not work if run in background

I have a script running in background, like: Now this script, invokeTest.sh has contents: Although it prints, “Hello World from invokeTest” it does not call test.sh. My question: Is there any way to call test.sh in infinite while loop directly from su – insite1 -c” “so that we ca…