Start a Conversation

This post is more than 5 years old

Solved!

Go to Solution

2081

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

8.6K Posts

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 ?

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

8.6K Posts

May 3rd, 2016 17:00

or use the undocumented -report report option

4 Posts

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 ?

8.6K Posts

May 4th, 2016 16:00

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

4 Posts

May 5th, 2016 12:00

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

No Events found!

Top