Edit2: Solved! Thank you all! 🥰 I was supposed to put quotation marks around the command argument variable/substitute within the script, as in scanimage -d [device] –format=png -p -o “$1”

Edit: turns out it’s not the accented character, but the whitespace character in front of július.png, since the script doesn’t accept julius.png either.

#!/bin/bash  
# name of the script is SCAN.bash  
scanimage -d [device] --format=png -p -o $1  

I have tried ’ ', " " and to escape it with \

./SCAN 'anyu 1988 július.png'  
./SCAN "anyu 1988 július.png"  
./SCAN anyu\ 1988\ július.png  

But it throws argument without option. It works fine if I type it out instead of scripting.

The target language is Hungarian and I have generated the necessary locale.

  • istdaslol@feddit.org
    link
    fedilink
    arrow-up
    2
    ·
    2 hours ago

    It does, bash uses your locale and if the umlauts are displayed correctly it is set to utf-8 or similar. Your other optiones aren’t parsed correctly

    ` #!/usr/bin/env bash

    filename=“$1” angle=“$2” resolution=“$3” `