Hi all,
I'm newbie in shell. I'm trying to create files with user name select from database on title with .csh file. So my solution is select name from database into an array, and then foreach name I create a file with that name on title. Like this:
set Name[] = `sqlplus -s ${MYSQL}` <<EOF
WHENEVER SQLERROR EXIT SQL.SQLCODE
SELECT NAME FROM TABLE;
EXIT;
EOF
foreach name (${Name[*]})
touch ${MYDIR}/${name}.xxx
�
Anyone can solve this?
---------- Post updated at 04:50 PM ---------- Previous update was at 04:17 PM ----------
problem solved!
Dear mod,
Help me to close this. Thanks!