4 votes

Bash Run Script on Multiple Files

Your script doesn't take any argument, the names of the INFILE and OUTFILE are hardcoded within. Here, I'd use zsh instead of bash, and do: transform() magick -quiet $1 \ -filter LanczosRadius \ ...
user avatar
2 votes
Accepted

Bash Run Script on Multiple Files

I show another way to solve the problem: to modify the original code using bash. make one single shellscript put a shebang at the top, #!/bin/bash, to control which shell should run the script make a ...
user avatar
  • 5,285
2 votes

Awk replace string where specific condition is true using variables

I would suggest something like this: $ awk -v FS=';' -v OFS=';' -v var1="$v1" -v var2="$v2" '$2 == var2 { $1 = var1 } 1' filename 0;20220808163547; 1224;20220808163547; 2048;...
user avatar
  • 119k
1 vote

How to compare hashes of files in bash script?

From the comment: But the script uses set -Eeo pipefail set -e causes the whole script to fail if and when sha256sum --check exits with a falsy status. To avoid that, put the command in any sort of ...
user avatar
  • 119k
1 vote

Sorting output of "*" wildcard for cd/ln command

With zsh: () { ln -sf -- /'path to theme file' $argv[-1]/interface-theme } '.../'*'/...(/n) Where the n glob qualifier enables numericglobsort (where 3.10 sorts after 3.9 instead of between 3.1 and ...
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible