quentin_lamamy Posted July 30 Share Posted July 30 (edited) 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 ^^ Edited July 30 by quentin_lamamy Quote Link to comment Share on other sites More sharing options...
dark_pyrro Posted July 30 Share Posted July 30 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. Quote Link to comment Share on other sites More sharing options...
quentin_lamamy Posted July 30 Author Share Posted July 30 it's part of an extension, i want, when $5 argument not set to replace it by a default value Quote Link to comment Share on other sites More sharing options...
dark_pyrro Posted July 30 Share Posted July 30 It seems on Discord as if you got your answers Quote Link to comment Share on other sites More sharing options...
quentin_lamamy Posted July 30 Author Share Posted July 30 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 Quote Link to comment Share on other sites More sharing options...
dark_pyrro Posted July 30 Share Posted July 30 ok, I read that you got the last brick of your extension in that discussion, but that was perhaps something else then Quote Link to comment Share on other sites More sharing options...
quentin_lamamy Posted July 30 Author Share Posted July 30 (edited) 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 Edited July 30 by quentin_lamamy Quote Link to comment Share on other sites More sharing options...
dark_pyrro Posted July 30 Share Posted July 30 Good, I'll wait for the GitHub PR Quote Link to comment Share on other sites More sharing options...
quentin_lamamy Posted July 30 Author Share Posted July 30 (edited) 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 Edited July 30 by quentin_lamamy Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.