Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 355270 - Correctly handle newline characters in command-line arguments
Summary: Correctly handle newline characters in command-line arguments
Status: RESOLVED FIXED
Alias: None
Product: PTP
Classification: Tools
Component: Remote Tools (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 355268
Blocks:
  Show dependency tree
 
Reported: 2011-08-19 16:58 EDT by John Eblen CLA
Modified: 2018-06-08 09:56 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Eblen CLA 2011-08-19 16:58:50 EDT
bug 354893 seems to handle all characters correctly except for the newline. Solutions for escaping the newline, though, seem to depend on the particular shell used. For example, the following work as indicated (the comment indicates the type of the user's default shell and of /bin/sh, respectively):

1) /bin/sh -c 'echo $'\''\n'\''' #*/bash, not */dash
2) /bin/sh -c 'echo "a           #any combination of dash and bash, not csh/*
b"'
3) /bin/sh -c 'echo "a\          #csh/*, not bash/*
b"'
Comment 1 Greg Watson CLA 2018-06-08 09:56:30 EDT
Appears to be informational.