Network and Storage Protocols

How to add text to a file via a script

opwnetapp
3,286 Views

This all started because I wanted to add SSH keys to an authorized_keys file.  (In linux this is VERY simple)

All the basic commands appear to be there: echo, wrfile -a, rdfile....

But there was no way to pipe the commands or redirect input/output.

Lets assume that I don't have CIFS or NFS access to my filer, how can I add some random text to a file using ssh or rsh access? The most user interaction I'm looking for is maybe entering a password.

Also, Enhancement Requests!

Please add some basic BASH features like:

autocomplete

proper ability to use home/end keys

When alerts come up on the console, don't have them inserted into the command line. I know the system does not recognize them, but it is very confusion when typing.  And of course the problem always happens when you need to use the command line to fix a problem so of course there are tons of alerts cluttering up the command line.

A full SSH suite (like scp sftp...)

Thanks

Bob Brandt

2 REPLIES 2

sharmadevender
3,286 Views

Hi

You are right, we cannot pipe commands in NetApp using NetApp console. but i can be performed, if you will set password less authenticaion using linux/unix server.

2.) if you don't have access to NFS or CIFS shares and you want to add text to file.

Use following procedure, i am taking example of host file in Netapp.

Login to NetApp console.

rdfile /etc/hosts {this will show you existing contents. copy these contents}

wrfile /etc/hosts

"add your text existing and New"

Ctrl + C

If you will use password less authentication. You can easily avoid annoying message on command line console.

sharmadevender
3,286 Views

Also you can use bash/awk/sed/perl scripts using password less authentication. it includes editing text files on Netapp.

Public