Hello,
I am programming a csh script which displays file-content and strings by using the vi-editor. The following program code works :
( cat /users/boots/filesForViewLog files/convert.logtxt ; \
head -n 2 /users/boots/filesForViewLog files/path_convert.lo gtxt ; \
echo nedit `pwd`/tools_*/convert.log "&" ; \
echo vi `pwd`/tools_*/convert.log "&" ; \
tail -n 2 /users/boots/filesForViewLog files/path_convert.lo gtxt ; \
cat tools_*/convert.log ) | view -
My problem starts when I want to check for the existence of the convert.log file as follows :
( cat /users/boots/filesForViewLog files/convert.logtxt ; \
head -n 2 /users/boots/filesForViewLog files/path_convert.lo gtxt ; \
set exists=`test -e `pwd`/tools_*/convert.log >& /dev/null` ;\)
if ($status == 0) then
echo nedit `pwd`/tools_*/convert.log "&" ;
echo vi `pwd`/tools_*/convert.log "&" ;
else ;
echo "file exists not" ;
endif ;
tail -n 2 /users/boots/filesForViewLog files/path_convert.lo gtxt ; \
cat tools_*/convert.log ) | view -
This code seems to fail at the if-statement. I have copied the shell-transcript below this mail. Who can help me with this?
Best Regards,
Theo Boots
>( cat /users/boots/filesForViewLog files/convert.logtxt ; \
? head -n 2 /users/boots/filesForViewLog files/path_convert.lo gtxt ; \
? set exists=`test -e `pwd`/tools_*/convert.log >& /dev/null` ;\
? if ($status == 0) then
Too many ('s.
> echo nedit `pwd`/tools_*/convert.log "&"
nedit /workspaces/boots/s480a/sc14480a/romflow/480a5m_rom_vers ions/nl1_2/TSMCWT_e/tools_nl1_2/convert.log &
> echo vi `pwd`/tools_*/convert.log "&"
vi /workspaces/boots/s480a/sc14480a/romflow/480a5m_rom_vers ions/nl1_2/TSMCWT_e/tools_nl1_2/convert.log &
>else
else? echo "file exists not"
else? endif
>tail -n 2 /users/boots/filesForViewLog files/path_convert.lo gtxt ; \
? cat tools_*/convert.log ) | view -
Too many )'s.
>
I am programming a csh script which displays file-content and strings by using the vi-editor. The following program code works :
( cat /users/boots/filesForViewLog files/convert.logtxt ; \
head -n 2 /users/boots/filesForViewLog files/path_convert.lo gtxt ; \
echo nedit `pwd`/tools_*/convert.log "&" ; \
echo vi `pwd`/tools_*/convert.log "&" ; \
tail -n 2 /users/boots/filesForViewLog files/path_convert.lo gtxt ; \
cat tools_*/convert.log ) | view -
My problem starts when I want to check for the existence of the convert.log file as follows :
( cat /users/boots/filesForViewLog files/convert.logtxt ; \
head -n 2 /users/boots/filesForViewLog files/path_convert.lo gtxt ; \
set exists=`test -e `pwd`/tools_*/convert.log >& /dev/null` ;\)
if ($status == 0) then
echo nedit `pwd`/tools_*/convert.log "&" ;
echo vi `pwd`/tools_*/convert.log "&" ;
else ;
echo "file exists not" ;
endif ;
tail -n 2 /users/boots/filesForViewLog files/path_convert.lo gtxt ; \
cat tools_*/convert.log ) | view -
This code seems to fail at the if-statement. I have copied the shell-transcript below this mail. Who can help me with this?
Best Regards,
Theo Boots
>( cat /users/boots/filesForViewLog files/convert.logtxt ; \
? head -n 2 /users/boots/filesForViewLog files/path_convert.lo gtxt ; \
? set exists=`test -e `pwd`/tools_*/convert.log >& /dev/null` ;\
? if ($status == 0) then
Too many ('s.
> echo nedit `pwd`/tools_*/convert.log "&"
nedit /workspaces/boots/s480a/sc14480a/romflow/480a5m_rom_vers ions/nl1_2/TSMCWT_e/tools_nl1_2/convert.log &
> echo vi `pwd`/tools_*/convert.log "&"
vi /workspaces/boots/s480a/sc14480a/romflow/480a5m_rom_vers ions/nl1_2/TSMCWT_e/tools_nl1_2/convert.log &
>else
else? echo "file exists not"
else? endif
>tail -n 2 /users/boots/filesForViewLog files/path_convert.lo gtxt ; \
? cat tools_*/convert.log ) | view -
Too many )'s.
>
Comment