linux - compare empty string cshell -
i facing problem compare empty string detected grep file. want detect empty file searched first if condition, file search empty, cannot go if ($vg == "") condition echo output , execute cp condition.
code use find file:
set lvg =`find ${lward}/netlists/verilog/ -name "${subblock}.v"`
below code:
foreach vg (${lvg}) if ($vg == "") echo "${subblock}.vg file not found" else if (${vg} =~ "*/${subblock}.vg") cp -r "$vg" ./primetime/design/verilog/${subblock}.v endif end
Comments
Post a Comment