sumansla

updated

10 years ago

S

sumansla

4 Posts

0

2190

May 3rd, 2016 13:00

Nas_Replicate -list Output

Hi,

I would like to capture the "nas_replicate -list" output and send to mail.

Can someone help me ..

Regards,

Suman

  • Rainer_EMC

    6 Operator

    8645 Posts

    1133

    0

    Posted May 4th, 2016 19:00

    Basic Unix / Linux

    nas_replicate -list | mail -s

    but then even what EMseeing described will be the same and NOT an attachment

    Did you actually try it ?

  • 1133

    0

    Posted May 3rd, 2016 14:00

    This will capture the output of the command to the file replicate_list.dat which can then be emailed to whomever

    [nasadmin@localhost ~]$ pwd

    /home/nasadmin  <--- this is where your output file will reside after issuing the below command

    [nasadmin@localhost ~]$ nas_replicate -list >>replicate_list.dat      <--- This is capturing the output

    [nasadmin@localhost ~]$ cat replicate_list.dat <--- This is what MY command produced

    Name                      Type       Local Mover               Interconnect         Celerra      Status

    [nasadmin@localhost ~]$ mail -s "Replicate_list info" mister@abc.com < replicate_list.dat  <--- this should send it -s=subject

  • Rainer_EMC

    6 Operator

    8645 Posts

    1133

    0

    Posted May 3rd, 2016 17:00

    or use the undocumented -report report option

  • sumansla

    4 Posts

    1133

    0

    Posted May 4th, 2016 12:00

    Thanks for the update. Is there any way to capture the output and re-direct to mail rather than sending as an attachment ?

  • Rainer_EMC

    6 Operator

    8645 Posts

    1133

    0

    Posted May 4th, 2016 16:00

    just pipe into mail or Mail - see the Linux man page

  • sumansla

    4 Posts

    1133

    0

    Posted May 5th, 2016 12:00

    yes, able to capture the content in mail rather than attachment. Thank you.