i got this snippet from a shell script , it run perfectly in Solaris environment
grep -h '??.*??' $1/{CT,{MYDIR{85,97}}{,_E}}/R*txt
but when i try to run shell script in ubuntu , it gives following error
grep: ./{MYDIR85}/R*txt: No such file or directory
grep: ./{MYDIR85}_E/R*txt: No such file or directory
after little bit of editing it run properly, i removed curly braces of MYDIR
grep -h '??.*??' $1/{CT,MYDIR{85,97} {,_E}} /R*txt
I want to know what is the problem , is it command incompatibility between linux and solaris ?
Note -i have three directory MYDIR85 , MYDIR97 and CT - in ubuntu , shell is /bin/bash - in solaris i don't know the shell type,but the first line of shell script is #!/bin/bash
echo $SHELL
? – steve Dec 26 '16 at 15:02csh
thing to me - see for example Why doesn't bash treat brace expansions exactly like csh? – steeldriver Dec 26 '16 at 15:08