Quick question to Linux G'MIC users.

gosgood@bertha ~ $ echo $SHELL
/bin/bash
gosgood@bertha ~ $ gmic m=$\{rep_cin\ \{\'\"Test A: \"\'\}\} echo $m
[gmic]./ Start G'MIC interpreter (v.3.4.1).
[gmic]./ Set local variable 'm=${rep_cin {'Test A: '}}'.

[gmic]./ End G'MIC interpreter.
gosgood@bertha ~ $ /bin/sh
sh-5.2$
sh-5.2$ gmic m=$\{rep_cin\ \{\'\"Test A: \"\'\}\} echo $m
[gmic]./ Start G'MIC interpreter (v.3.4.1).
[gmic]./ Set local variable 'm=${rep_cin {'Test A: '}}'.

[gmic]./ End G'MIC interpreter.
sh-5.2$ 

Debug:

sh-5.2$ ^D 
exit
gosgood@bertha ~ $ gmic debug m=$\{rep_cin\ \{\'\"Test A: \"\'\}\} echo $m
[gmic]./ Start G'MIC interpreter (v.3.4.1, debug mode).
<gmic>./ Initial command line: 'cli_start , debug "m=${rep_cin {'"Test" A: "'}} echo'.

<gmic>./ Enter scope './'.
<gmic>./ Item[0]: 'cli_start', selection [].
<gmic>./ Found custom command 'cli_start:  -command /home/gosgood/git_repositories/gmic-community/include/garry_osgood.gmic' (takes no arguments).
<gmic>./ Expand command line for command 'cli_start' to: ' -command /home/gosgood/git_repositories/gmic-community/include/garry_osgood.gmic'.
<gmic>./ Decompose command line into 4 items: 
<gmic>./   item[0] = (debug info 0x6)
<gmic>./   item[1] = (debug info 0x7)
<gmic>./   item[2] = '-command'
<gmic>./   item[3] = '/home/gosgood/git_repositories/gmic-community/include/garry_osgood.gmic'

<gmic>./cli_start/ Enter scope 'cli_start/'.
<gmic>./cli_start/#7 Item[2]: '-command' -> 'command', selection [].
<gmic>./cli_start/#7 Command 'command': arguments = '/home/gosgood/git_repositories/gmic-community/include/garry_osgood.gmic'.
[gmic]./cli_start/ Import commands from file '/home/gosgood/git_repositories/gmic-community/include/garry_osgood.gmic', with debug info (21 replaced, total: 4786).
<gmic>./cli_start/#7 Exit scope 'cli_start/'.

<gmic>./ Item[2]: 'debug', selection [].
<gmic>./ Item[3]: 'm=\$\{rep_cin \{'Test A: '}}', selection [].
[gmic]./ Set local variable 'm=${rep_cin {'Test A: '}}'.
<gmic>./ Item[4]: 'echo', selection [].
<gmic>./ Command 'echo': arguments = ''.

<gmic>./ Exit scope './'.

[gmic]./ End G'MIC interpreter.

EDIT: $m\$m

gosgood@bertha ~ $ echo $SHELL && gmic m=$\{rep_cin\ \{\'\"Test A: \"\'\}\} echo \$m
/bin/bash
[gmic]./ Start G'MIC interpreter (v.3.4.1).
[gmic]./ Set local variable 'm=${rep_cin {'Test A: '}}'.
${rep_cin {'Test A: '}}
[gmic]./ End G'MIC interpreter.
gosgood@bertha ~ $ 
1 Like