Because ‘nohup’ expects a single-word command and its arguments – not a shell loop construct. You’d have to use:
nohup sh -c 'for i in mydir/*.fasta; do ./myscript.sh "$i"; done >output.txt' &
More Related Contents:
- Looping through the content of a file in Bash
- Why should eval be avoided in Bash, and what should I use instead?
- How to permanently set $PATH on Linux/Unix [closed]
- Setting an argument with bash [duplicate]
- How to kill a child process after a given timeout in Bash?
- How to generate a core dump in Linux on a segmentation fault?
- How to get overall CPU usage (e.g. 57%) on Linux [closed]
- Aborting a shell script if any command returns a non-zero value
- How to merge two files using AWK? [duplicate]
- How to set environment variable for everyone under my linux system?
- Linux: copy and create destination dir if it does not exist
- What is the difference between using `sh` and `source`?
- Setting environment variables in Linux using Bash
- What does `set -x` do?
- Does “argument list too long” restriction apply to shell builtins?
- Given two directory trees, how can I find out which files differ by content? [closed]
- How to sort a file in-place?
- How do I syntax check a Bash script without running it?
- Is it OK to use the same input file as output of a piped command?
- Uppercasing First Letter of Words Using SED
- When to wrap quotes around a shell variable?
- How do you normalize a file path in Bash?
- Linux/Unix command to determine if process is running?
- How do I get cURL to not show the progress bar?
- Using `date` command to get previous, current and next month
- Joining multiple fields in text files on Unix
- Need to remove the count from the output when using “uniq -c” command
- Bash script to remove ‘x’ amount of characters the end of multiple filenames in a directory?
- Creating temporary files in bash
- How do you run a script on login in *nix?