I am trying to call a script using another script located in a different directory but some errors(related to the location of the file) appear. To ilustrate my problem, I will show an example.
Imagine that I have a folder called 001, and inside the folder has another 3 subfolders called A , B and C. Furthermore, inside the folder 001 there are a script called
In each subfolder A, B and C I has the files lista, listb and listc respectively
When I execute the
script, the output are printed and every is OK.
But I am interested to call this script using the
motherscript, but I get the error.
cat: A/lista: No such file or directory cat: B/listb: No such file or directory cat: C/listc: No such file or directory
Ilustration of directories
folder |_ motherscript |_ 001 |_ A | |_lista |_ B | |_listb |_ C | |_listc |_ script
cat A/lista B/listb C/listc > output
1 2 3
4 5 6
7 8 9
1 2 3 4 5 6 7 8 9