β² 100 βΌ Which way do you expand variables? (lemmy.world) submitted 3 years ago by zephyr@lemmy.world [M] to c/linuxmemes@lemmy.world 23 comments fedilink hide all child comments
[β] subtext@lemmy.world 5 points 3 years ago (1 child) I believe the actual behavior here would be printing βdongβ as the shell interpreter is greedy in its evaluation of variables. permalink fedilink source parent hideshow 2 child comments replies: [β] vrighter@discuss.tchncs.de 2 points 2 years ago (1 child) the actual behavior here is to echo the literal string "$foobar", because the $ sign is escaped. so no variable expansion will take place at all. permalink fedilink source parent hideshow 2 child comments replies: [β] RazorsLedge@lemmy.world 2 points 2 years ago (2 children) Oh lol. It doesn't show the $ at all on my mobile app till I escaped it permalink fedilink source parent hideshow 4 child comments replies: [β] vrighter@discuss.tchncs.de 2 points 2 years ago ah, so it's up to the client. I'm using jerboa, in this case permalink fedilink source parent [β] rtxn@lemmy.world 1 point 2 years ago (1 child) You should use markdown's inline code (single `backtick`) and block code (triple backtick) tags. They are consistent across most markdown renderers (except Reddit's, which uses four-space indentations (like, who the fuck thought that was a good idea?)) permalink fedilink source parent hideshow 2 child comments replies: [β] RazorsLedge@lemmy.world 1 point 2 years ago I did use triple backticks permalink fedilink source parent
[β] vrighter@discuss.tchncs.de 2 points 2 years ago (1 child) the actual behavior here is to echo the literal string "$foobar", because the $ sign is escaped. so no variable expansion will take place at all. permalink fedilink source parent hideshow 2 child comments replies: [β] RazorsLedge@lemmy.world 2 points 2 years ago (2 children) Oh lol. It doesn't show the $ at all on my mobile app till I escaped it permalink fedilink source parent hideshow 4 child comments replies: [β] vrighter@discuss.tchncs.de 2 points 2 years ago ah, so it's up to the client. I'm using jerboa, in this case permalink fedilink source parent [β] rtxn@lemmy.world 1 point 2 years ago (1 child) You should use markdown's inline code (single `backtick`) and block code (triple backtick) tags. They are consistent across most markdown renderers (except Reddit's, which uses four-space indentations (like, who the fuck thought that was a good idea?)) permalink fedilink source parent hideshow 2 child comments replies: [β] RazorsLedge@lemmy.world 1 point 2 years ago I did use triple backticks permalink fedilink source parent
[β] RazorsLedge@lemmy.world 2 points 2 years ago (2 children) Oh lol. It doesn't show the $ at all on my mobile app till I escaped it permalink fedilink source parent hideshow 4 child comments replies: [β] vrighter@discuss.tchncs.de 2 points 2 years ago ah, so it's up to the client. I'm using jerboa, in this case permalink fedilink source parent [β] rtxn@lemmy.world 1 point 2 years ago (1 child) You should use markdown's inline code (single `backtick`) and block code (triple backtick) tags. They are consistent across most markdown renderers (except Reddit's, which uses four-space indentations (like, who the fuck thought that was a good idea?)) permalink fedilink source parent hideshow 2 child comments replies: [β] RazorsLedge@lemmy.world 1 point 2 years ago I did use triple backticks permalink fedilink source parent
[β] vrighter@discuss.tchncs.de 2 points 2 years ago ah, so it's up to the client. I'm using jerboa, in this case permalink fedilink source parent
[β] rtxn@lemmy.world 1 point 2 years ago (1 child) You should use markdown's inline code (single `backtick`) and block code (triple backtick) tags. They are consistent across most markdown renderers (except Reddit's, which uses four-space indentations (like, who the fuck thought that was a good idea?)) permalink fedilink source parent hideshow 2 child comments replies: [β] RazorsLedge@lemmy.world 1 point 2 years ago I did use triple backticks permalink fedilink source parent
[β] RazorsLedge@lemmy.world 1 point 2 years ago I did use triple backticks permalink fedilink source parent