zhaojinhong / pdsh-ops_tools

Automatically exported from code.google.com/p/pdsh
GNU General Public License v2.0
0 stars 0 forks source link

option to remove .hostname when doing a rpdcp #50

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I was wondering if there was anyway to get an option so when doing a rpdcp it 
does not tag on .hostname to the end of the file.

In my case i have 300 servers with files named hostname.html that i retrieve.  
i remove the .hostname from the file after it is downloaded, but it would be 
great if there was an option to just not have it on there to begin with (i do 
understand the problems if it tries to grab two files with the same name).

thanks,

Sean

Original issue reported on code.google.com by iffla...@gmail.com on 12 Jul 2012 at 8:47

GoogleCodeExporter commented 9 years ago
This should be doable -- I wonder if an output format is the best way to do 
this -- like %f expands to filename, %h hostname, %n nodeid .. the default 
would be %f.%h, but you could change that to %f -- I'm not sure what to do if a 
filename already exists though.

Maybe the best thing would indeed be an option to avoid adding the hostname, 
but as you said, the documentation would say something to the effect of "at 
your own risk" ;)

Original comment by mark.gro...@gmail.com on 12 Jul 2012 at 9:21