Shell Word Expansion
Jan. 9th, 2013 12:50 pmThis is how you perform word expansions using wordexp() system interface:
https://gist.github.com/4492253
( Source )
alexo@kuha:~/wordexp$ make cc -o wordexp wordexp.c ./wordexp echo hello world 0: 'echo' 1: 'hello' 2: 'world' "\$HOME = $HOME" '$PWD'\ =\ $PWD 0: '$HOME = /home/alexo' 1: '$PWD = /home/alexo/wordexp' alexo@kuha:~/wordexp$
https://gist.github.com/4492253
( Source )