Запустите tcsh в определенном каталоге - PullRequest
0 голосов
/ 24 августа 2018

Поддерживает ли tcsh запуск себя в удаленном каталоге через аргумент?

Настройка, с которой я имею дело, не позволяет мне выполнить chdir в удаленный каталог перед вызовом tcsh, и я бы хотел избежатьсоздать файл .sh для этого рабочего процесса.

Вот доступные аргументы, которые я вижу для v6.19:

> tcsh --help                                                                                          
tcsh 6.19.00 (Astron) 2015-05-21 (x86_64-unknown-Linux) options wide,nls,dl,al,kan,rh,color,filec                                                                  

-b file         batch mode, read and execute commands from 'file' 
-c command      run 'command' from next argument                  
-d              load directory stack from '~/.cshdirs'            
-Dname[=value]  define environment variable `name' to `value' (DomainOS only) 
-e              exit on any error
-f              start faster by ignoring the start-up file
-F              use fork() instead of vfork() when spawning (ConvexOS only)
-i              interactive, even when input is not from a terminal
-l              act as a login shell, must be the only option specified
-m              load the start-up file, whether or not owned by effective user
-n file         no execute mode, just check syntax of the following `file'
-q              accept SIGQUIT for running under a debugger
-s              read commands from standard input
-t              read one line from standard input
-v              echo commands after history substitution
-V              like -v but including commands read from the start-up file
-x              echo commands immediately before execution
-X              like -x but including commands read from the start-up file
--help          print this message and exit
--version       print the version shell variable and exit

1 Ответ

0 голосов
/ 24 августа 2018

Это работает, но неоптимально, потому что запускает два экземпляра tcsh:

tcsh -c 'cd /tmp && tcsh'
...