Fix arg passing bug in rsc.
[utils.git] / rsc
diff --git a/rsc b/rsc
index 0e96deb..9e7e760 100755 (executable)
--- a/rsc
+++ b/rsc
@@ -37,6 +37,8 @@ if($ARGV[0] eq "-s") {
        s/([\\\n])/\\$1/g;
        $arg .= "$_\n";
     }
-    exec "ssh", "$host", "rsc", "-s", encode_base64($arg);
+    $ea = encode_base64($arg);
+    $ea =~ s/\n//g;
+    exec "ssh", "$host", "rsc", "-s", $ea;
     die "$!";
 }