New answers tagged arguments
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 ...
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
...
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 ...
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
...
Top 50 recent answers are included
Related Tags
arguments × 494bash × 227
shell-script × 127
shell × 97
command-line × 61
function × 35
scripting × 33
quoting × 31
linux × 26
options × 19
xargs × 18
find × 17
variable × 17
parameter × 17
files × 15
pipe × 15
command × 15
zsh × 13
array × 13
getopts × 12
io-redirection × 11
posix × 11
wildcards × 10
grep × 9
regular-expression × 9