quentin_lamamy Posted July 30, 2023 Share Posted July 30, 2023 Hi, In my extension i am trying to set default parameters, i try this but doesn't work "MYFUNC") if [ -z $5]; then $5=${1:-"foo"} fi # HERE DO SOMETHING COOL ;; But it don't work, I'm sure it's possible but i'm not very familiar with bash, i'm a backend developer not an admin sys ^^ Link to comment Share on other sites More sharing options...
dark_pyrro Posted July 30, 2023 Share Posted July 30, 2023 Is it calling the function that is the issue, or the execution of the function itself? Snippets without the full context is not that optimal to try to help and troubleshoot. Link to comment Share on other sites More sharing options...
quentin_lamamy Posted July 30, 2023 Author Share Posted July 30, 2023 it's part of an extension, i want, when $5 argument not set to replace it by a default value Link to comment Share on other sites More sharing options...
dark_pyrro Posted July 30, 2023 Share Posted July 30, 2023 It seems on Discord as if you got your answers Link to comment Share on other sites More sharing options...
quentin_lamamy Posted July 30, 2023 Author Share Posted July 30, 2023 I did not ask on discord for this issue but i can. But i don't want to ask more than 20 question a day on discord XD Link to comment Share on other sites More sharing options...
dark_pyrro Posted July 30, 2023 Share Posted July 30, 2023 ok, I read that you got the last brick of your extension in that discussion, but that was perhaps something else then Link to comment Share on other sites More sharing options...
quentin_lamamy Posted July 30, 2023 Author Share Posted July 30, 2023 nop it's just an improvment, it works with empty var but it not so powerfull than default value And i have 2 extension at 99%, a discord exfiltration , and a osx extension with lot of system features Link to comment Share on other sites More sharing options...
dark_pyrro Posted July 30, 2023 Share Posted July 30, 2023 Good, I'll wait for the GitHub PR Link to comment Share on other sites More sharing options...
quentin_lamamy Posted July 30, 2023 Author Share Posted July 30, 2023 5 minutes ago, dark_pyrro said: Good, I'll wait for the GitHub PR Discord exfiltration still have some issue, variable scope, escaping. Even with Korben explaination , i'm still a bit lost. What a hell ^^ But the basic usage, exfiltrate text and file works, just want to finish cosmetics with discord embed message feature Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.