Here is "escape puzzle" from real life task:
Conditions:
We need to create an alias which will
- Save current directory path
- Will ssh to particular server
- Then will cd to saved path (it's mounted via NFS)
- Then will find all files with name patter as "All*.bld" and run particular editor opening each of found files.
From command prompt next command do the trick:
set PWD=`pwd` ; ssh luna1 "cd $PWD ;find . -name 'All*.bld' -ok multi {} \; "
However it generates an error running form ~/.alias
#!/bin/tcsh
alias a alias
a mallluna 'set PWD=`pwd` ; ssh luna1 "cd $PWD ; find . -name 'All*.bld' -ok multi {} \; &" '
I didn't succeed to escape ' ' in file name pattern.
Any ideas/solutions?
Thank you in advance.