So far while surfing web I've discovered nice addition to my gpg password generator and I've decided to adjust my alias with these commands. Here is the codegpg --gen-random 1 20 | perl -ne'print Your password: ;s/[\x00-\x20]/chr(ord($^N)+50)/ge;s/([\x7E-\xDB])/chr(ord($^N)-93)/ge;s/([\xDC-\xFF])/chr(ord($^N)-129)/ge;print $_, \n'Here is what I've tried so far:alias genpass(){    gpg --gen-random 1 $1 | perl -ne'    print Your password: ;    s/[\x00-\x20]/chr(ord($^N)+50)/ge;    s/([\x7E-\xDB])/chr(ord($^N)-93)/ge;    s/([\xDC-\xFF])/chr(ord($^N)-129)/ge;    print $_, \n'}but error occurs when spawning new instance of bash:bash: /home/user/.bashrc: line 18: syntax error near unexpected token `('bash: /home/user/.bashrc: line 18: `alias genpass()'I'm quite new to bash scripting so can not figure out how this token should be properly escaped.
Alias for perl script
perl;password;alias;bashrc;gpg
You have the alias statement when you don't need it, what you're actually creating is a function, replace the word alias with function and it will work as expected.You also don't actually need function either, you could just have the following and it will work as expected;genpass(){    gpg --gen-random 1 $1 | perl -ne'    print Your password: ;    s/[\x00-\x20]/chr(ord($^N)+50)/ge;    s/([\x7E-\xDB])/chr(ord($^N)-93)/ge;    s/([\xDC-\xFF])/chr(ord($^N)-129)/ge;    print $_, \n'}