single quote problem with rsync


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting single quote problem with rsync
# 1  
Old 12-04-2008
Data single quote problem with rsync

Hi everybody,

I'm a newbie and hope that someone help me in this problem.

I have a filename in LINUX with single quote like this:

abs@hosttest:~/ABS/BETY/cygdrive/C/DECLARANOT 1.1.4/02 - ROCK/052 - GUNSROSES> dir You*
-rw-r--r-- 1 abs users 2365881 2008-08-25 09:16 You're Crazy.mp3

The file is You're Crazy.mp3.

I want to recover this file from windows, i use the next command:

C:\>rsync -avrz --progress abs@test.no-ip.org://home/abs/ABS/BETY/cygdrive/C/"'DECLARANOT 1.1.4/02 - ROCK/052 - GUNS
ROSES/You're Crazy.mp3'" /ABS_RECOVERY\
Password:
bash: -c: line 0: unexpected EOF while looking for matching `''
bash: -c: line 1: syntax error: unexpected end of file
rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(644) [receiver=3.0.2]

when the filename has no single quote, i have not problems.

I hope someone can help me with this problem.

Thanks in advance, and congratulations for this great forum.

Atte
The Boysito

PD.Sorry for my poor english
# 2  
Old 12-05-2008
Try escaping it with a backslash.
# 3  
Old 12-05-2008
Data Still do not work !

Hi zaxxon,

Thanks for your answer.

I do this ...


C:\>rsync -avrz --progress abs@test.no-ip.org://home/abs/ABS/BETY/cygdrive/C/"\'DECLARANOT 1.1.4/02 - ROCK/052 - GUNS
ROSES/You're Crazy.mp3\'" /ABS_RECOVERY\
Password:
rsync: on remote machine: -: unknown option
rsync error: syntax or usage error (code 1) at main.c(1426) [server=3.0.2]
rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(644) [receiver=3.0.2]

But don't work ( I think windows-msdos, does not support backslash)

This is the error message:



Is correct the escaping backslash implementing ?

Any idea ?

Thanks in advance!

Last edited by mr_boysito; 12-05-2008 at 08:48 AM.. Reason: I Forgot the error message
# 4  
Old 12-05-2008
Try using only the " character instead of both " and ' .

HTH
# 5  
Old 12-05-2008
Data Still with the error

Hi, bluescreen

I try it, but i get the same error.

C:\>rsync -avrz --progress abs@test.no-ip.org://home/abs/ABS/BE.../C/"DECLARANOT 1.1.4/02 - ROCK/052 - GUNSR
OSES/You're Crazy.mp3" /ABS_RECOVERY\
Password:
bash: -c: line 0: unexpected EOF while looking for matching `''

I have even tested with several combinations, but ... nothing. Smilie

I have no doubt that it works in linux, but
the problem is that I need to run in dos-windows environment

maybe have to try it yourself from a dos-windows to see the problem


Another idea!

Last edited by mr_boysito; 12-05-2008 at 09:48 AM.. Reason: Syntax error, sorry !
# 6  
Old 12-05-2008
Data Nothing yet

Hi Folks.

Nothing yet ?

Thanks in advance !
# 7  
Old 12-05-2008
Power Remeber me please!

Remeber me please!

Thanks !
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Single quote _error_.

Hi all... (This is Don's domain.) I have come across an anomaly in sh and dash compared to bash. It involves echoing a character set to a file in sh and dash compared to bash. It is probably easier to show the code and results first. #!/usr/local/bin/dash #!/bin/sh #!/bin/bash echo... (4 Replies)
Discussion started by: wisecracker
4 Replies

2. Shell Programming and Scripting

Replacing all but the first and last double quote in a line with a single quote with awk

From: 1,2,3,4,5,This is a test 6,7,8,9,0,"This, is a test" 1,9,2,8,3,"This is a ""test""" 4,7,3,1,8,"""" To: 1,2,3,4,5,This is a test 6,7,8,9,0,"This; is a test" 1,9,2,8,3,"This is a ''test''" 4,7,3,1,8,"''"Is there an easy syntax I'm overlooking? There will always be an odd number... (5 Replies)
Discussion started by: Michael Stora
5 Replies

3. Shell Programming and Scripting

single quote replacement

hi all, i have a data in the file which of the formate : 100,102,103 and the required formate is \'100\',\'102\',\'103 Idealy we need to replace , with \',\' Regards arkesh (2 Replies)
Discussion started by: arkeshtk
2 Replies

4. Shell Programming and Scripting

Replace single quote with two single quotes in perl

Hi I want to replace single quote with two single quotes in a perl string. If the string is <It's Simpson's book> It should become <It''s Simpson''s book> (3 Replies)
Discussion started by: DushyantG
3 Replies

5. Shell Programming and Scripting

remsh problem with single quote (')

Hi All, Im executing the shell script remotely. here is one statement from that: remsh $rHost -l $rUser "java -jar $TARGET/toolkit/apps/bin/toolkit-stm.jar network -m -d1 /abmusr06/abm/users/dywrk01/$package/DYP_Execution/data/configuration/network_aus/network -u2... (1 Reply)
Discussion started by: AB10
1 Replies

6. Shell Programming and Scripting

Awk problem: How to express the single quote(') by using awk print function

Actually I got a list of file end with *.txt I want to use the same command apply to all the *.txt Thus I try to find out the fastest way to write those same command in a script and then want to let them run automatics. For example: I got the file below: file1.txt file2.txt file3.txt... (4 Replies)
Discussion started by: patrick87
4 Replies

7. Shell Programming and Scripting

Regex in grep to match all lines ending with a double quote (") OR a single quote (')

Hi, I've been trying to write a regex to use in egrep (in a shell script) that'll fetch the names of all the files that match a particular pattern. I expect to match the following line in a file: Name = "abc" The regex I'm using to match the same is: egrep -l '(^) *= *" ** *"$' /PATH_TO_SEARCH... (6 Replies)
Discussion started by: NanJ
6 Replies

8. Shell Programming and Scripting

escaping single quote

hi, echo 'abc' will give output abc how can i get output as 'abc' plz help. thanks in advance (3 Replies)
Discussion started by: javeed7
3 Replies

9. Shell Programming and Scripting

single quote

Hi I have a shell script with many lines as below: comment on column dcases.proj_seq_num is dcases_1sq; .... .... I want the above script to be as below: comment on column dcases.proj_seq_num is 'dcases_1sq'; I want to have single quotes like that as above for the entire shell... (2 Replies)
Discussion started by: dreams5617
2 Replies

10. Shell Programming and Scripting

Replacing a single quote

Hi there I have a data file like so below 'A/1';'T100002';'T100002';'';'01/05/2004';'31/05/2004';'01/06/2004';'08/06/2004';'1.36';'16';'0.22';'0';'0';'1.58';'0';'0';'0';'0';'0';'0';'clientes\resumen\200405\resumen_T100002_T100002_1.pdf';'';'0001';'S';'20040501';'';'02';'0';'S';'N'... (3 Replies)
Discussion started by: rjsha1
3 Replies
Login or Register to Ask a Question