[ create a new paste ] login | about

Link: http://codepad.org/566yNSLC    [ raw code | fork ]

Plain Text, pasted on Sep 2:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
malatos:~>cat bin/deluge
#! /bin/bash
ARGS=
for arg in "$@"; do
  ARGS+="\"$(echo $arg | sed -e 's/\\/\\\\/g;s/"/\\"/g')\" "
done
echo "ARGS=$ARGS"
ssh hikaru ls $ARGS
malatos:~>deluge a b 'a b' '"x y"' 'x\y' 'x\\y'
ARGS="a" "b" "a b" "\"x y\"" "x\\y" "x\\\\y" 
ls: cannot access a: No such file or directory
ls: cannot access b: No such file or directory
ls: cannot access a b: No such file or directory
ls: cannot access "x y": No such file or directory
ls: cannot access x\y: No such file or directory
ls: cannot access x\\y: No such file or directory



Create a new paste based on this one


Comments: