Skip to content
This repository has been archived by the owner on Jul 11, 2019. It is now read-only.

parallel: command error: I/O error: No such file or directory (os error 2) #65

Open
FrancescElies opened this issue Feb 1, 2018 · 4 comments

Comments

@FrancescElies
Copy link

Issue

Using parallel version MIT/Rust Parallel 0.11.3

Steps to Test

  1. Execute script
#!/usr/bin/env bash

parallel echo ::: 1 2 ::: A B

Output:

1 A
1 B
2 A
2 B
  1. Execute script
#!/usr/bin/env bash
my_function() {
    echo $1 $2
    echo "more things"
}
export -f my_function
parallel my_function ::: 1 2 ::: A B

Output:

parallel: command error: I/O error: No such file or directory (os error 2)
parallel: command error: I/O error: No such file or directory (os error 2)
parallel: command error: I/O error: No such file or directory (os error 2)
parallel: command error: I/O error: No such file or directory (os error 2)
parallel: encountered errors during processing:
1: 1 A: I/O error: No such file or directory (os error 2)
2: 1 B: I/O error: No such file or directory (os error 2)
3: 2 A: I/O error: No such file or directory (os error 2)
4: 2 B: I/O error: No such file or directory (os error 2)

Am I doing something wrong in the second example?
I am on Mac OS

Thanks for your support

@ChrisJefferson
Copy link

Parallel only runs programs, not shell commands, by default. I put my_function into a shell script and run that script (there may be a way of making it run shell commands..)

@FrancescElies
Copy link
Author

I see, thanks for the reply.
Gnu parallel supports the execution of shell commands, do we want to keep this issue open or shall I close? (either way is fine with me)

@japrogramer
Copy link

japrogramer commented Feb 4, 2018

Open, Im trying this line with rust parallel but i get the same error
(echo google.com; echo yahoo.com) | parallel 'traceroute {}'
however in gnu parallel the equivalent line here works
(echo google.com; echo yahoo.com) | time parallel -k -j+0 traceroute

also what is the rust-parallel equivalent to gnu-parallels -k ?

@zwieberl
Copy link

Just to add another voice:
I would also like to have the ability to execute shell-functions within a script, exactly as described by the OP.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants