bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

script with ssh and filenames with spaces


From: gscantlen
Subject: script with ssh and filenames with spaces
Date: Wed, 17 Jul 2013 20:42:17 +0000 (UTC)

plz help with this script, 

I wish to ssh this command to several hosts: 
ls -alst "dir_with_spaces" 

This script is close but I need DOUBLE-quotes around the remote command s 
#! /bin/bash 

PARAMS_FOR_LS=(-alst "dir with spaces") 

# get directory of local system 
ls "address@hidden" 

# get directory of remote systems 

#do search 'x' for a hostname; get host1 
ssh host1 ls "address@hidden" 

#do search 'y' for a hostname; get host2 
ssh host2 ls "address@hidden" 

#do search 'z' for a hostname; get host3 
ssh host3 ls "address@hidden" 


I have tried several variations of eval and echo. 
plz help 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]