Timeline for Remove unwanted character from a variable
Current License: CC BY-SA 4.0
9 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jan 27, 2020 at 9:11 | comment | added | JoBe | Oh,, sorry will fix that. Messer is the application that this script will execute .. | |
| Jan 27, 2020 at 9:01 | comment | added | RudiC |
You lost me. I see three commands / scripts /scripts/tautullimess.sh, ./test1.sh, and messer, nested in an obscure way, and all different parameter sets. I'm afraid I can't help further.
|
|
| Jan 27, 2020 at 8:44 | comment | added | JoBe | I've added more context (the whole script) so it will be easier to understand what I'm saying.. I added your part instead of my $var3 on the last line. However, it seems like the script removes the ' chars my it self, as you can see by the txt.txt output, or maybe .. I don't know.. | |
| Jan 27, 2020 at 8:28 | comment | added | RudiC |
More context necessary. For me, it works (prints param count, and parameters): ${var3//[\',]} - CNT: 16, P1: Alf, P2: Complete, ALL: Alf Complete - S1E1 - Episode 1 has been paused hellfire i Engsub - Series testing]
|
|
| Jan 27, 2020 at 8:09 | comment | added | JoBe |
The result was: ./test1.sh: 22: ./test1.sh: Bad substitution and I exexuted: ./test1.sh 'kalle','damke','hekl' one interesting thing is that when I just echoed $var3 without your modification it seemed to strip the ' signs by it self: messer --command='m "Adam Larsson" testing kalle,damke,hekl '
|
|
| Jan 27, 2020 at 7:57 | comment | added | JoBe | Yeah, oh, does that executes it as a command, I thought it only displayed the result (newbie as I wrote) | |
| Jan 27, 2020 at 7:55 | comment | added | RudiC |
Try $ ${var3//[\',]}
|
|
| Jan 27, 2020 at 7:51 | comment | added | JoBe | Anyway to echo the result so it will be executed as a command? Or echo it to another variable? | |
| Jan 27, 2020 at 7:41 | history | answered | RudiC | CC BY-SA 4.0 |