New answers tagged

1 vote
Accepted

GNU Parallel with named arguments

--header : does almost what you want. It is made for CSV-files where the first line is a header. So you need to prepend 'grid/embedder_name' with 'name': $ cat grid/embedder_name name ae cnn $ cat ...
user avatar
  • 30.4k
1 vote

GNU Parallel with named arguments

Have thought about wrapping it in a script/function? E.g. #!/bin/bash genarglist() { for ((i=1;i<=$#;i++)) ; do echo -n " --embedder_${!i} {$i}" done for ((i=1;i<=$#;i++)) ; do ...
user avatar
  • 11.2k
1 vote

identify if present and remove specific argument from shell args

For any POSIX shell (without using a temporary array): Dropping any instance of -f followed by java8, or of -fjava8, from the list of positional parameters, while counting the number of such dropped ...
user avatar
  • 275k
0 votes
Accepted

identify if present and remove specific argument from shell args

Maybe something like this? I'm assuming you want to remove -f java8... #!/bin/bash while (( $# )); do if [[ $1 = "-f" ]] && [[ $2 = "java8" ]]; then shift 2 ...
user avatar

Top 50 recent answers are included