https://issues.apache.org/bugzilla/show_bug.cgi?id=49429
Summary: sshexec should have option to stripLastCharacter
Product: Ant
Version: 1.8.1
Platform: PC
OS/Version: Windows NT
Status: NEW
Severity: minor
Priority: P2
Component: Core tasks
AssignedTo: [email protected]
ReportedBy: [email protected]
Created an attachment (id=25589)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=25589)
Ant 1.8.1 SSHExec.java, modified to include new parameter StripLastCharacter
As described on the ant users list in August 2009,
http://old.nabble.com/sshexec-td24832653.html
output from sshexec includes a newline at the end.
This creates difficulties when the output is intended for later use. To give an
example, I have an Ant build that needs to find a process ID. I do this with
the sshexec task by executing:
ps -ef | grep -v grep | grep ${mysearchstring} | awk '{ print $2 }'
This gives me a process ID, but also a newline at the end, which I must then
remove using a stripLastChar macrodef.
It would be far more convenient if there was an option in the sshexec task to
strip this last character out of the output.
Attached is a version of SSHExec.java, created by modifying Ant 1.8.1, which
has this parameter and strips the last character out as required. Maybe you
could consider this for inclusion in the next release of Ant?
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.