mailx -s is showing an error

Error is like

/users/d12381/check.sh: mail_sysadmin@mycompany: not found

Plz help me to sort out this issue

Including a fair amount of guesswork here, I would imagine that /users/d12381/check.sh is a shell script of yours which tries to invoke mailx -s, but also contains some sort of syntax error, which causes it to try to use an email address as a Unix command.

Compare:

bash$ nosuchcommand@all.sir
bash: nosuchcommand@all.sir: command not found

bash$ /bin/sh
$ nosuchcommand@all.sir
nosuchcommand@all.sir: not found
$

This is a script and at the end i want to send a a file to an email ID
But when i am checking the log file created by the script,it is showing that the corresponding mail is not found.

This is a script and at the end i want to send a a file to an email ID
But when i am checking the log file created by the script,it is showing that the corresponding mail is not found.

I'm sorry, but it's pretty impossible to guess what the problem is if you don't show the code.

#!/bin/ksh
echo "Mountpoint Utilisation " > file1
echo "################################" >> file1
df -h >> file1
echo " " >> file1
echo " " >> file1
echo "Total No of Processes" >> file1
echo "#################################">> file1
ps -ef |wc -l >> file1
cat file1 | mailx -s "Total Processes and Mountpoint Utilisation in `hostname`"
mail_sysadmin@mycompany.com </dev/null
exit
-----------------
-----------------------------------
Crontab entry is ...
48 15 * * * sh /users/d12381/check.sh > /users/d12381/check.log 2>&1

You can't have a line wrap at the end of the "cat" command. Also, this is a Useless Use of Cat.

mailx -s "Total Processes and Mountpoint Utilization in `hostname`" \
  mail_sysadmin@mycompany.com <file1

A more elegant solution would avoid the use of a temporary file. Cron jobs have their output sent to the invoker by mail anyway so you could avoid the whole explicit invocation of mailx (unless mail_sysadmin is somebody else than yourself; but then see the MAILTO variable of Cron).