Well I meant to quote it... To show how one usually wants to send a script to stdin on remote host. Usually one does want the parameter expansion done on the remote host. You'd otherwise need to be more careful. Ideally you'd replace the ls with a more appropriate function. Without knowing what's in /builds it's hard to guess. But seeing that he's splitting at / and printing the last two, I'd expect something like:
or maybe its
But anyway, in regards to passing a script the a remote host, I'd start with something like this:
but the real issue is what is the structure of the directory so we can avoid parsing ls and having false matches and such.
Thanks all, @neutronscott--the code kind of work , i get the files from the directory for the box specified but gets all the files, not reading the user input.
If i hardcode the build name , i get all the matches for March .
ls -lrt ./*/* | awk -F\/ '/\//{print $(NF-1) $NF }' | grep "March"
Hello Good Day / Guten Tag....
I have to login the server and the user profile contains some scripts which need the inputs to be taken from the keyboard.
So I use the method to conn.authenticateWithKeyboardInteractive(username, new InteractiveCallback() {
public String... (1 Reply)
Hello! We currently use a SecureCRT .vbs script which automates logging into multiple boxes to run a few commands. However, I'd like to have something run in Linux vs. our emulator. Below is my objective :):
Our current .vbs script will look at an IP list .txt file on our PC, then login to... (1 Reply)
Hi Guys,
Just wanted to seek your assistance on an issue encountered with one of our client DNS server query. we have 2 sets of DNS servers.. internal and external. For Internal to reach the external DNS server (DMZ) it has to go through 2 FWs.
Current settings:
- FW rules for Internal... (3 Replies)
Hi,
How to find remote Linux box login account without login in to that box?
I don't have login account at my remote Linux box. But I need who are all having login account. How do I findout?
Thanks,
--Muthu. (3 Replies)
Hello all !
I'm trying to write a shell script (bash) to ftp a file starting with particular name like "Latest_" that is present on a Windows box to UNIX server. Basically I want to set this script in the cron so that daily the new build that is posted on the Windows box can be downloaded to the... (2 Replies)
I have to login with ssh to a UNIX box and execute a script in it.
How will i make use of ssh-keygen so that while login using ssh it wont ask the passwod. ssh-copy-id is not working in my UNIX box . What might be the reason. Please help. (1 Reply)
I am able to run the UNIX commands in a Windows box from a UNIX box through "SSH" functionality. But whenever the SSH connection is established between UNIX and Windows, password for windows box is being asked.
Is there a way to avoid asking password whenever the SSH connection is made? Can I... (1 Reply)
i have a unix script which is available in a box say box1
i want this script to be run in box box2
and put the output file in box2
what is the procedure to execute this script in box2
i will call the script in box1 using cybermation (1 Reply)
When I login to a unix box using a putty session , I'm landed in a vi editor, instead of my home directory,I'm guessing instead of pointing me to my home directory, the system points me to /usr/bin/vi. As a result, everytime I log into the system I open up a vi editor and am in there. how do i... (3 Replies)