linux - Bash script that will execute a program over all files in a directory -


After typing "itemprop =" text ">

A bash script will write more than all files in the directory 'allfiles' program 'main'. The main execution is I. Results are then directed to the 'output.dat' file

Whenever I run the Bash script, I get "./main: No such file or directory". Bash script, main and 'All files' directory are all in '/ home / directory /' I am not sure why I am getting this error, or if I am correctly writing the Bash script Any help is greatly appreciated. For file in / home / directory / allfiles / *

  #! / bin / bash ./main $ file & gt; & Gt; Edit.dat done   

Edit: Must be clear that 'main' is a performance one text made after a makefile

If you are not in the / home / directory while running the script, then this key will not be found! & Gt; Try the party for

  # / bin / into / home / directory / allfiles / * / home / directory / main $ file & gt; Output Deleted   

Additionally, if the key is not executable, then you have to get the bash to call it manually. Use the bash / home / directory / main $ file for that, or use the main execution chmod + x main .

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -