Seems fine for automatic processing, but perhaps it will create each disulfide twice? This may not be a problem though, but you should check with a system where you also define the disulfides yourself.

A semi-automatic way of doing this for systems that you are not familiar with is to first get all the CYS SG-SG distances shorter than 2.5Å:

coor dist sele atom * cys sg end sele atom * cys sg end cut 2.5

and then use the resulting output to setup patches for the handful of real disulfides.

Yes, apparently CHARMM doesn't create a disulfide bond that is already generated because hydrogen atoms are already deleted (CHARMM returns a LEVEL 1 WARNING).I tested it using two chains and it works fine.

Your idea to use coor dist command is a good one. I didn't use it because I was not possible to iterate along the selection. Do you think it is possible? If yes, we can iterate considering only CYS residues...

It is possible to iterate on a selection via the .subset. option, but NOT over the list of named atoms produced by COOR DIST with a double selection.

However, you can divert the list to a file via OUTU, process the list externally via the SYSTEM command which calls a script or program that produces a CHARMM stream file, then read the stream file. The script or program can use whatever tool you feel comfortable with, e.g. python, perl, bash script using awk and sed, etc. The CHARMM framework would be something like

Here, makestr.sh would process cyslist.txt to produce the patch commands required in cyslist.str. I've used a similar approach recently to generate a stream file to define a list of time series via the ENTER command of CORREL.