Saving and appending show command output to a file

For output of a show command saved or appended to a file, the oscmd command enables you to display the file.

  1. Save the show command output to a file.
    device# show ssh server status | save status 

    In this example, the show ssh server status output is saved to the status file.

  2. Display the contents of the file with the Linux cat command.
    device# oscmd cat status 
    VRF-Name: mgmt-vrf      Status: Enabled
    VRF-Name: default-vrf   Status: Enabled
    
  3. Append the show output to an existing file.
    device# show ip interface brief | last 5 | append status
    In this example, the show ip interface brief output is appended to the status file.
  4. Display the contents of the file with the Linux cat command.
    device# oscmd cat status
    VRF-Name: mgmt-vrf      Status: Enabled
    VRF-Name: default-vrf   Status: Enabled
    Ethernet 2/58       unassigned    default-vrf   administratively down     down
    Ethernet 2/59       unassigned    default-vrf   administratively down     down
    Ethernet 2/60       unassigned    default-vrf   administratively down     down
    Ethernet 2/125(I)   unassigned    default-vrf   administratively down     down
    Ethernet 2/126(I)   unassigned    default-vrf   administratively down     down