Posts by aegilops@fosstodon.org
(DIR) Post #ALXQPRc2Qaqd8ubdx2 by aegilops@fosstodon.org
2022-07-16T04:38:16Z
0 likes, 0 repeats
@nicemicro you can deal with spaces by quoting the variable with double quotes. If you run ShellCheck on the script it should make that suggestion!
(DIR) Post #ALZfOFYADDGmDXSjui by aegilops@fosstodon.org
2022-07-17T06:35:33Z
0 likes, 0 repeats
@nicemicro like this, using "..." around the variable. That avoids injecting the spaces into the shell, which among other things can prevent security vulnerabilities:```while read -r líne do echo "$line"; done < inputfile```
(DIR) Post #ALa2rGnYwoNvQtTKqG by aegilops@fosstodon.org
2022-07-17T07:32:27Z
0 likes, 0 repeats
@nicemicro oops, ignore the accent on the variable! 🤣
(DIR) Post #AMSAMAyRS8ACj1MsE4 by aegilops@fosstodon.org
2022-08-12T13:36:56Z
0 likes, 0 repeats
@someodd use ShellCheck. It'll teach you loads about correct bash use by pointing out common style, function and security errors
(DIR) Post #ANpoAOeRfio5BjeKcC by aegilops@fosstodon.org
2022-09-22T21:13:28Z
0 likes, 0 repeats
@lig CodeQL :github: