Weird filenames in bash shell

Hi,
I installed qt_tools, a nice command line app to convert files.
The only problem is that it doesn't respect the target name I give him, like in this example:
ibook-g4-di-flapane:~/Desktop flapane$ qt_export Daniele\ Silvestri\ -\ Faccia\ di\ velluto.mp3 Daniele\ Silvestri\ -\ Faccia\ di\ vellutoNEW.mp3
+
+ exporter subtype : mp3
+ exporter mfr : PYEh
+
+ duration : all
+ video : off
+
+ audio : off
+
# progress: (012:000) 0.00% Daniele Silvestri - Faccia di velluto.mp3 --> Daniele Silvestri - Faccia di vellutoNEW.mp3
and so on...
BUT the result file I have will be Daniele Silvestri - Faccia di#0 and not Daniele Silvestri - Faccia di vellutoNEW.mp3
This doesnt happen if using the classical lame commandline program.
I am sure it depends from SPACE characters, isn't it?
Do you have any hints?

flapane wrote:
@clea
I agree with you, you can browse the source from the link i posted above, I wrote to the developer and I hope he will answer me soon.
I'd be interested to know how the developer responds - the same issue is very annoying in the osxutils package which appears not to have been updated/active for quite a while. Would definitely like to know a fix!
The workaround could work, but if you convert a lot of mp3, it could be a not-very-elegant solution, as you already said. I also tought to the perl function rename($a,$b), but I didn't get how to obtain a proper script, atm.
You are way ahead of me already, I'm afraid. I agree the work around is inelegant. I just know I can't personally offer a source code fix and it is all I can come up with right now - other than using shorter names, of course.
- cfr

Similar Messages

  • How to invoke BASH shell and execute a command in that shell in Windows 98

    Hello, I have a problem and if somebody will help me, I will be very glad. Thank you.
    I am using BASH shell on Windows 98 OS by means of CYGWIN. And I want to invoke this BASH shell and execute a preprogrammed command in the shell (./scan fileName.txt) from a JAVA program. But so far, I am not sucessful. I can not read or write anything from / to BASH shell. It either blocks and freezes (When I use waitFor( ) ) or appears and disappears without executing scan command (When I do not use waitFor( ) ). My code is like this:
    // This method is used for compiling a file.
    // It invokes BASH shell and executes "./scan fileName.txt" command
    public void compileFileMethod () {
    try {
    Process proc = ( Runtime.getRuntime() ).exec ("C:\\MyDocuments\\CYGWIN.BAT); //I also tried to add -c ./scan fileName.txt after .BAT );
    // I also tried to write "C:\\MyDocuments\\BASH.EXE" but it did not help
    OutputStream ostr = proc.getOutputStream();
    BufferedWriter bw = new BufferedWriter ( new OutputStreamWriter (ostr) );
    InputStream istr = proc.getInputStream();
    BufferedReader br = new BufferedReader ( new InputStreamReader (istr) );
    InputStream errorStr = proc.getErrorStream();
    BufferedReader errorBr = new BufferedReader ( new InputStreamReader (errorStr) );
    bw.write("scan case40.10.txt"); /* I am trying to input the scan command to the shell,but it is not working*/
    bw.flush();
    Vector list = new Vector (1) ;
    String str;
    while ( (str = br.readLine() ) != null) {
    list.addElement(str);
    } // End of while
    Enumeration enumForList = list.elements();
    while ( enumForList.hasMoreElements() ) {
    String tempString;
    tempString = ( String ) enumForList.nextElement();
    System.out.println(tempString); // I am trying to read the outputs of the scan command but it is not reading (I can not see any output)
    I tried with and without waitFor( ), it did not work
    // wait for command to terminate
    proc.waitFor();
    // close streams
    br.close();
    bw.close();
    errorBr.close();
    } // End of try
    catch ( IOException ioe ) {
    JOptionPane.showMessageDialog (null, "Input / output error occured while compiling file ", "Error", JOptionPane.ERROR_MESSAGE);
    } // End of catch
    catch ( SecurityException se ) {
    JOptionPane.showMessageDialog (null, "Security error occured while compiling file ", "Error", JOptionPane.ERROR_MESSAGE);
    catch ( InterruptedException ie ) {
    JOptionPane.showMessageDialog (null, "Interruption error occured while compiling file ", "Error", JOptionPane.ERROR_MESSAGE);
    } // End of method compileFileMethod
    // Thank you for your helps and time.

    You cannot invoke BAT files directly, you have to invoke the program that run those files which is your Windows 98 shell. For example (under windows 2000), i would invoke "cmd.exe sricpt.bat some args", rather than "script.bar some args".
    Hope this will help you out.

  • Creating weird filenames

    Hi all,
    After I read this article, http://www.dwheeler.com/essays/fixing-u … names.html (with which I actually agree in most points), I wondered how one can create files with such weird names.
    I tried a lot, but did not succeed in it.
    I am interested in this, because I am writing a php script that will parse user input to "ls". Allthough I guess I will just forbid all weird filenames and restrict them to the Portable Filename Character Set, I still was interested (just for the heck of it).
    I guess such things can be done with C quite easily, but is it possible with Bash? Have any of you ever experimented with black arts like this?
    Eager to know about your dirty hacks
    jocom

    You can specify any character in bash by the following syntax $'\xHH' (HH is the hexadecimal code of the character). Some specific syntax are also supported.
    Some funny file names
    touch beep$'\x07'
    give a file name with a beep in it (echo * will give you an audible beep; ls seems to filter these funny characters).
    touch Hello$'\n'World
    give a file name with a newline in it (again visible by echo *).
    Last edited by olive (2011-01-13 20:02:47)

  • Bash shell scripting

    Dear Mac Users:
    I have a bash script which I copied from a bash book to learn how to use bash. Whenever I try to run it on Linux (cygwin--Windows Linux interpreter) it throws an error that something is wrong with the syntax.
    But when I try to run the same script on my Mac using Terminal.app the bash shell throws an error saying access denied. I chowned a copy of bash and referenced this copy in my script but I still get the error. I also chowned the script to the user account on my Mac. Why can I not run the script?

    #!/bin/bash
    # cookbook filename: mkalbum
    # makalbum - make an html "album" of a pile of photo files
    # ver 2.0
    # An album is a directory of html pages.
    # It will be created in the current directory
    # An album page is the html to display one photo,with
    # a title that is the filename of the photo, along with
    # hyperlinks to the first, previous, next, and last photos.
    # ERROUT
    ERROUT()
    printf "%b" "$@"
    } >&2
    # USAGE
    USAGE()
    ERROUT "usage: %s <newdir>
    " $(basename $0)
    # EMIT(thisph, startph, prevph, nextph, lastph)
    EMIT()
    THISPH="../$1"
    STRTPH="${2%.*}.html"
    PREVPH="${3%.*}.html"
    NEXTPH="${4%.*}.html"
    LASTPH="${5%.*}.html"
    if [ -z "$3" ]
    then
    PREVLINE='<TD> Prev </TD>'
    else
    PREVLINE='<TD> Prev </TD>'
    fi
    if [ -z "$4" ]
    then
    NEXTLINE='<TD> Next </TD>'
    else
    PREVLINE='<TD> Next </TD>'
    fi
    cat <<EOF
    <HTML>
    <HEAD><TITLE>$THISPH</TITLE></HEAD>
    <BODY>
    $THISPH
    <TABLE WIDTH = "25%">
    <TR>
    <TD> First </TD>
    $PREVLINE
    $NEXTLINE
    <TD> Last </TD>
    </TR>
    </TABLE>
    </BODY>
    </HTML>
    EOF
    if (($# !=1 ))
    then
    USAGE
    exit -1
    fi
    ALBUM="$1"
    if [ -d "${ALBUM}"]
    then
    ERROUT "Directory [%s] already exists.
    " ${ALBUM}
    USAGE
    exit -2
    else
    mkdir "$ALBUM"
    fi
    cd "$ALBUM"
    PREV=""
    FIRST=""
    LAST="last"
    while read PHOTO
    do
    # prime the pump
    if [ -z "${CURRENT}" ]
    then
    CURRENT="$PHOTO"
    FIRST="$PHOTO"
    continue
    fi
    PHILE=$(basename "${CURRENT}")
    EMIT "$CURRENT" "$FIRST" "$PREV" "$PHOTO" "$LAST" > "${PHILE%.*}.html"
    #set up for next iteration
    PREV="$CURRENT"
    CURRENT="$PHOTO"
    done
    PHILE=$(basename ${CURRENT})
    EMIT "$CURRENT" "$FIRST" "$PREV" "" "$LAST" > "${PHILE%.*}.html"
    # make the symlink for "last"
    ln -s "${PHILE%.*}.html" ./last.html
    # make a link for index.html
    ln -s "${FIRST%.*}.html" ./index.html

  • Weird filename are getting created in archive directory.

    Hi All,
    Weird filename are getting created in archive directory.
    I have one ftp adapter,after the file getting processed the file's are getting moved to archive directory.
    But with some different file name/ filename are randomly generated. But the content of the file remains the same.
    Pls suggest.
    Thanks.

    This is standard functionality, it uses the original filename with a suffix of the datetime.
    cheers
    James

  • Bash shell for  sid adm and ora sid user

    I'm planning to make bash shell as the the default shell for my <sid>adm and ora<sid> user. Will there any issues? It seems harmless.
    My current setups are ECC6 on top of  AIX 5.3 and Oracle 10g
    regards,
    Marjan

    The only problem is permission of user access to that bash shell. as well as what u u want to run i mean to say if it is any haevy erport or update insert or refresh functionality then do not run at the time of haevy load.
    Thanks

  • DIsplay variable setting ReflectionX in Bash shell

    Everyone,
    Can somebody help me with setting display variable for running Configtool in ReflectoinX in Bash shell.
    Appreciate your time. Thanks.

    > It looks like it will work..only thing is that we need to set display variable..i assume.
    If you logon as <sid>adm then no DISPLAY (or other variable) must be set if you use XDMCP.
    > I am doing sudo for opening a java tool which needs x window..other x windows like visual admin is working fine but for configtool, i am getting this error saying display variable is not set.
    That's what I was saying - do not switch users (sudo, su etc.) - that will delete the environment and invalidate .Xauthority.
    > I am not given the <sid>adm password, can i just use X window with sudo OR do i need to get the <sid>adm password to start the configtool..
    In that case I would not use XCMCP to connect but a pure telnet, do sudo and then set the DISPLAY to
    <your-IP>:<reflection-display>. the latter can be found when open Reflection in the lower part of the configuration window.
    Markus

  • Cisco ASA 5545-X Running Bash shell service???

    Hi,
    May I check whether if currently Cisco ASA 5545-X is having/using Bash shell service?
    If yes, how can I disable the service?
    Thks and Rgds

    Please reference this link
    http://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20140926-bash
    As per Cisco, ASA not effected, but as a precaution, eliminate if not limit ssh/htpps connections to authorized hosts until browser patches have been distributed. 

  • Any tips on Controlling interactive bash shell on Cygwin via Java process?

    Ideally, I'd like to be able to control an interactive bash shell on Cygwin from a Java process. But for starters, I want to do 'ls > /cygdrive/c/fred.txt'. The little program to do this, below, doesn't work. It simply runs without error.
    Any ideas? And also, any tips on doing a fully interactive shell?
    --> Java program to test simple command:
    package com.treelogic_swe.real_estate_explorer.utils;
    import java.io.File;
    import java.io.InputStream;
    * Quick and dirty test of Java to Cygwin bash shell process control.
    * Thanks to [email protected]
    * re: http://groups.google.com/group/comp.lang.java.help/browse_thread/thread/914403fbdd1de127/40363d2e7cbae823?lnk=st&q=cygwin+shell+java+process+runtime&rnum=1&hl=en#40363d2e7cbae823
    public class RunSystemCommand {   
        public static void main(String args[]) throws Throwable {
         // System command to run
         String cmd = "ls > /cygdrive/c/fred.txt";
            String [] sysArgs = { };
         // Set the working directory for the OS command processor
         File workDir = new File( "c:/cygwin/bin" );
         Process bash = Runtime.getRuntime().exec( cmd, sysArgs, workDir );
         InputStream bashIn = bash.getInputStream();
         while( bashIn.read() != -1 ); // Added, as otherwise the ls hangs.
         bash.waitFor();
    }

    Ideally, I'd like to be able to control an
    interactive bash shell on Cygwin
    What do you mean by this? Do you just want to start a bash shell, and have it's input and output come from and go to your Java program?
    Please be specific about what you want, as there are a couple of interpretations for what you said. You need to understand the differences and relationships among terminals, shells, shell builtins, and executables.
    You'll want to read this:
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
    from a Java
    process. But for starters, I want to do 'ls >
    /cygdrive/c/fred.txt'. The little program to do
    this, below, doesn't work. It simply runs without
    error.
    , <, |, and others are specific to the shell. When you're in a terminal, and you type ls > /tmp/zzz, it's the bash shell that interprets the >. Cygwin doesn't know anything about it. ls doesn't know anything about it.So if you want to to that, the command you'd execute from Java is not ls, but bash (or some other shell). You'd then tell bash to execute the rest. I'm not sure what the command line arg is for bash to tell it the rest of the command line args are a command that bash should interpret and execute. I think it might be -c like it is for zsh. So you'd need to do something like Runtie.getRuntime().exec("bash -c 'ls > /tmp/zzz'");

  • Bash shell

    hi,
    in my solaris 9 (sparc) i am using the sh shell. i like to upgrade to the bash shell.
    please guide me on how can i do this? i m a newbie on solaris 9.
    thanks.

    Yes, it is included, just as bubbwe has noted.
    You would need to have installed the Developer Cluster or more.
    Core Cluster does not include it..
    Here's a link to the cluster contents in the Sun System Handbook.
    http://sunsolve.sun.com/handbook_pub/Software/Solaris_Ref/Solaris_9/clusterchart.html

  • Bash shell's .bash_history file

    In a Bash shell .bash_history file is generated.
    How we can modify the settings so as to get timestamp in .bash_history?
    Regards
    Ritesh
    Edited by: riteshumrawala on Jun 30, 2008 1:27 PM

    Exit bash shell and start a new one. history on command line should show timestamps. I have timestamps in my .bash_history file, but they are not formatting properly.
    #echo $HISTTIMEFORMAT
    #%D:%T
    #echo $0
    #bash
    #history
    1 07/03/08:13:13:52env
    2 07/03/08:13:14:23env
    3 07/03/08:13:14:29ls -la
    4 07/03/08:13:14:31pwd
    5 07/03/08:13:14:40find / -name profile
    6 07/03/08:13:14:58ls -la
    7 07/03/08:13:15:04ls -latr
    8 07/03/08:13:15:15cat .bash_history
    9 07/03/08:13:15:38echo $0
    10 07/03/08:13:15:39ls -la
    11 07/03/08:13:15:45cat .bash_history
    #cat .bash_history
    #1215105232
    env
    #1215105263
    env
    #1215105269
    ls -la
    #1215105271
    pwd
    #1215105280
    find / -name profile
    #1215105298
    ls -la
    #1215105304
    ls -latr
    #1215105315
    cat .bash_history
    #1215105338
    echo $0
    #1215105339
    ls -la
    #1215105345
    cat .bash_history
    Not sure why the cryptic timestamp in .bash_history
    john

  • Problems customizing bash shell

    I am trying to add some customizing environment and aliases to my bash shell but cannot seem to get the .bash_profile file to be recognized when I open a xterm. I can source the file and get it loaded but would rather it be automatic. Any suggestions?
    G4, G5   Mac OS X (10.3.9)  

    I found a post in another area explaining that X11 is invoked as a non-shell start and therefore reads .bashrc and not .bash_profile. Moved my commands to that file and everything works.

  • Bash shell does not recognise 'java', 'javac' commands (Linux command line)

    i' ve used javac and java compile & execute commands to build the same application on the DOS command line with Windows - no problem.
    But when I try to compile the same file on the command line under Linux Redhat (7.1) using Bash shell i get <bash: javac: command not found> and <bash: java: command not found>.
    In both cases I'm using j2sdk1.4.2 downloaded from java.sun.com for Windows & Linux respectively.
    I make sure I have both the javac and the file I want to compile in the same directory ../j2sdk1.4.2/bin for both the Windows and the Linux applications.
    Is there something I need to do to get bash to recognise javac, java etc? Is there a different setup procedure?
    Any angles on this are much appreciated ..

    Have you tried these correctly..
    Set the CLASSPATH environment variable to include whichever directories you like, eg (on bash) type:
    export CLASSPATH=$CLASSPATH:.:<your java dirs>
    To make java easier to run, put the directory in which it is installed into your path:
    export JAVA_HOME=<where you installed java>
    Then do
    export PATH=$PATH:$JAVA_HOME/bin
    verify it has worked by simply typing
    java
    You can put all of these commands into the .*rc file for your shell, so that they are executed every time you open the shell. So if you are using bash you can put them into ~/.bashrc
    Read up setting the PATH and CLASSPATH for more info.
    This shall resolve the issue .

  • Problem with running Bash shell scripts

    I am unable to run Bash shell scripts on the UNIX Terminal application.
    This is the transcript from the Terminal application.
    Zhi-Yang-Ongs-Computer:/Applications/MetaPost/metapost-1.102 zhiyangong$ ./test1.sh
    dyld: Symbol not found: _BC
    Referenced from: /usr/local/bin/bash
    Expected in: /usr/lib/libSystem.B.dylib
    Trace/BPT trap
    Zhi-Yang-Ongs-Computer:/Applications/MetaPost/metapost-1.102 zhiyangong$
    Is this a problem with the the default installation of the Bash shell? Can I install the Bash shell on my own? If so, how can I do that?
    Also, how can I get the dynamic linker, dyld, to refer to the symbol "_BC"? What does this symbol "_BC" refer to?

    This was in your posted output:
    /usr/local/bin/bash
    You are NOT running the default bash, you are trying to run a private copy.
    The default Mac OS X bash is located at
    /bin/bash
    Try the following:
    /bin/bash ./test1.sh
    Does that work?
    What is the first line of your script? Is it:
    #!/bin/bash
    Or maybe
    #!/usr/bin/env bash
    /usr/bin/env would find the first bash in PATH . I find this most useful for finding perl on different systems, but sh, ksh, bash, zsh, csh, tcsh are all generally found in /bin so I do not bother using /usr/bin/env
    And if you have
    #!/usr/local/bin/bash
    Then the person that wrote test1.sh choose to use something besides the default bash
    Or maybe this script was transferred from some system where you needed to put your own copy of bash in /usr/local/bin because the vendor does not distribute bash
    Then again, you have not showed us what is inside your script, so it is possible something in the script called something else which invoked the /usr/local/bin/bash
    If that is the case, then you might try:
    /bin/bash -x ./test1.sh
    which should show you the commands executed before it died.

  • AppleScript: How to let AppleScript use the same environment as Bash shell does?

    Howdy!
    I can run AppleScript from Bash shell.
    I can also run Bash shell from AppleScript.
    So my question is when I run a Bash shell script from AppleScript, I am hit with a path problem.
    Suppose my AppleScript is under ~user/a.scpt. I want my AppleScript to know its current path (i.e. ~user/a.scpt).
    So a quick snippet test in my AppleScript shows that AppleScript always begins from the root directory:
    do shell script "pwd"
    So let's do a workaround AppleScript like this:
    tell application "Finder" to set currentDir to (target of front Finder window) as text
    do shell script "cd " & (quoted form of POSIX path of currentDir) & "; pwd"
    This works. However, this approach poses a potential danger.
    Suppose when I run this AppleScript for a bash script, I inadvertently clicked other Finder Window. That would result in execution of bash script in that newly clicked Finder Window, resulting in a big mess.
    Is there a better way to let the AppleScript to know its current path?

    The following is what your Applescript environment looks like, so plan accordingly.  If you want your Applescripts to be portable to other user environments, you should NOT depend on your environment, but rather embed all the environment knowledge you need into your script.
    Applescript "do shell script" environment
    pwd:
    /bin/ls -dlaeO@ .
    drwxr-xr-x  36 root  wheel  - 1292 Feb 28 09:58 .
        /usr/bin/id -a
    uid=501(raharris)
    gid=20(staff)
    groups=20(staff),
    402(com.apple.sharepoint.group.1),
    12(everyone),
    61(localaccounts),
    79(_appserverusr),
    80(admin),
    81(_appserveradm),
    98(_lpadmin),
    403(com.apple.sharepoint.group.2),
    33(_appstore),
    100(_lpoperator),
    204(_developer),
    398(com.apple.access_screensharing),
    399(com.apple.access_ssh)
    $#
    0
    $0
    /path/to/your/shell/script
    printenv:      
    SHELL=/bin/bash
    TMPDIR=/var/folders/4t/t1djbq6j5pj951x44l9hwxtc0000gn/T/
    Apple_PubSub_Socket_Render=/tmp/launch-mSKKJo/Render
    USER=<username_running_the_Applescript>
    SSH_AUTH_SOCK=/tmp/launch-7D4zpF/Listeners
    __CF_USER_TEXT_ENCODING=0x1F5:0:0
    PATH=/usr/bin:/bin:/usr/sbin:/sbin
    __CHECKFIX1436934=1
    PWD=/
    HOME=/Users/<home_dir_of_running_user>
    SHLVL=2
    LOGNAME=<username_running_the_Applescript>
    DISPLAY=/tmp/launch-qKucki/org.macosforge.xquartz:0
    _=/usr/bin/printenv
    Message was edited by: BobHarris

Maybe you are looking for

  • ICal events are missing Day and Month in date

    Hello, Sorry if this has been addressed elsewhere - this is such a weird fault I was not sure how to search for it. My iCal events are missing the Day and Month in their start and end dates - it just shows a 4 digit year which can only be edited as a

  • Yoga 13 Time Out of Sync

    On my new Yoga 13, the time does not remain accurate.  When I sync with the time server, it updates correctly, but from then on gradually falls behind.  Anyone else having this issue?

  • HELP!!!!!  FCP won't read project!

    Alright. Here is the synopsis of my problem: I was having trouble with Soundtrack Pro: stalling, extremely long process times, unexpectedly closing etc... I was told to delete Soundtrack Pro and to reinstall it. So, I deleted Soundtrack Pro from my A

  • Preprinted letter for intrastat

    HI Experts, can you tell me the name of standard preprinted letter  for intrastat (MM part)? I'm trying to print it out but without succes ;-( I am also trying to save intrastat on my PC. I go through meis transaction. System gives me information tha

  • Color sorting JXList - SwingX-style

    This is triggered by overloaded radio buttons -- good GUI design? but completely unrelated to what's currently discussed there: it's Friday afternoon and I simply couldn't resist to take the color list and show-off sorting SwingX-style :-) - JXList s