Weird unbalanced quotes error


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Weird unbalanced quotes error
# 1  
Old 08-30-2010
Weird unbalanced quotes error

hi all,

i am writing a wrapping script to burn subtitle into video file using transcode. I got this very weird error:

code:
Code:
inFile="movie.avi"
subFile="sub.srt"
outFile="movie_sub.avi"
strExc="-i $inFile -x 'mplayer=-sub $subFile' -w $vidBR -o $outFile -y xvid"
echo "transcode $strExc"
transcode $strExc

The output in command line is:
Code:
transcode -i movie.avi -x 'mplayer=-sub sub.srt' -w 792 -o movie_sub.avi -y xvid
[transcode] critical: Invalid argument for -x/--import_with (unbalanced quotes)

Which is weird, because both the quotes after the "-x" parameter are the same. If I just copy the first line (which is the output of the echo command), and paste it back to the command line and hit enter, then it just runs without complaining anything!

Can anyone give me some advice?

Thank you,
Cuong

Last edited by radoulov; 08-30-2010 at 01:50 PM.. Reason: Please use code tags!
# 2  
Old 08-30-2010
Try it with eval:
Code:
eval transcode "$strExc"

# 3  
Old 08-30-2010
Great, it works! Thank you a lot.

Regards,
Cuong
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Weird error after excutiong, completed fine though

Hi Guys - I'm getting the following error when I run my script: which: no Data_Export.sh in (.) However, my code completes with fine with a return code of 0. The above error message gets directed to my error file. Any ideas? Here is my script: #source... (1 Reply)
Discussion started by: SIMMS7400
1 Replies

2. Shell Programming and Scripting

Weird Error (: No such file or directory)

Hi Everyone, I am trying to make this script to use, to find out the DAHDI channel status. Every thing works fine, I even get proper results, however I have this weird error that comes along. Can someone please help me. Thanks a lot. #!/bin/bash # Color to set the test to when a channel is... (3 Replies)
Discussion started by: jeetz
3 Replies

3. Shell Programming and Scripting

awk weird error

Here is the awk code i wrote : if ; then gawk -v field_position="$field_position" -v field_length="$field_length" -v header="$header" -v trailer="$trailer" -v lr="$lr" '{ if(NR==1&&header=="1") { next } if(NR==lr&&trailer=="1") { next }... (1 Reply)
Discussion started by: ysvsr1
1 Replies

4. Shell Programming and Scripting

Issue with Single Quotes and Double Quotes for prompt PS1

Hi, Trying to change the prompt. I have the following code. export PS1=' <${USER}@`hostname -s`>$ ' The hostname is not displayed <abc@`hostname -s`>$ uname -a AIX xyz 1 6 00F736154C00 <adcwl4h@`hostname -s`>$ If I use double quotes, then the hostname is printed properly but... (3 Replies)
Discussion started by: bobbygsk
3 Replies

5. Shell Programming and Scripting

Weird Perl error using db2.

I have having a heck of a time figuring this out so any help is much appreciated. Here is the code where it seems to be dying, I bolded the part it is complaining about: $sth = $dbh->prepare( $query ) or die "error with query\n"; $sth->execute() or die "error executing query ...\n"; while(... (1 Reply)
Discussion started by: savigabi
1 Replies

6. UNIX for Dummies Questions & Answers

Weird Error moving a file

Hi, We are running into very weird error on AIX. Target directory exists on NFS. We have one script runs every 5 mins on our system. This script is running for 5 years for now without any issuess. Followig is the snapshot of the script : stmt_cnt=$(ls -1 ${1}/${2}|wc -l) if ;... (7 Replies)
Discussion started by: himihir2000
7 Replies

7. Ubuntu

Need help with a weird sudo error.

I'm fairly new to unix and I was trying to change the name of my host and my user. I changed the name in /hostname using this: gksudo gedit /etc/hostname I then tried changing the name back but it still gave the same error: {env_reset,... (1 Reply)
Discussion started by: H3jck
1 Replies

8. Programming

What is unbalanced IRQ?

------------------------ WARNING: at kernel/irq/manage.c:225 __enable_irq+0x3b/0x57() Unbalanced enable for IRQ 4 Modules linked in: svsknfdrvr Pid: 634, comm: ash Tainted: G W 2.6.28 #1 Call Trace: warn_slowpath+0x76/0x8d profile_tick+0x2d/0x57 irq_exit+0x32/0x34 ... (3 Replies)
Discussion started by: dragonpoint
3 Replies

9. Programming

C - advice how to catch some weird error

I have some unstable mistake in my program and out-of-idea how to catch it. I am looking for advice with a way to work it out! I have in a pretty complicated program (but one source file) set of int-counters - 15, if exactly. Lately, on final printout I have inpossible value (I am... (3 Replies)
Discussion started by: alex_5161
3 Replies

10. Web Development

weird 500 Internal server error

Hi All, I am seeking some help. While trying to access my website: EDITED (hosted on private server somewhere - don't want to publicize names) - I have a weird behaviour: I can always get to the site - but some applications get a 500 Internal error. If I use FireBug (mozilla addon) I can... (2 Replies)
Discussion started by: saariko
2 Replies
Login or Register to Ask a Question