/**********************************************************************
** 概要:
** to use shell in c
**
**********************************************************************/
int separate(char *p_filename)
{
int iRtn;
char sysCmd[100];
char szShellName[100]; /* shell name */
/*create shell name */
sprintf( szShellName, "%s","xxx.csh" );
// put long data into string
sprintf( szSplitCnt, "%ld", lSplitCnt );
/*create command*/
sprintf( sysCmd, "csh %s/%s %s",
(char*)getenv("CSH_DIR"), /* C shell folder */
szShellName, /* sh name */
szSplitCnt /* parameter */
);
iRtn = system(sysCmd);
if (iRtn == 0)
{
return (ok);
}
else
{
//to deal with error
}
}