Results 1 to 2 of 2

Thread: zsh: Execute string with command and params

  1. #1
    Join Date
    Aug 2007
    Location
    Denmark
    Beans
    Hidden!
    Distro
    Xubuntu 12.10 Quantal Quetzal

    zsh: Execute string with command and params

    I want to do like this in zsh:

    Code:
    S=aacgain -r
    $S audio.m4a
    I get the error: zsh: command not found: -r

    What I wanted to happen: aacgain -r audio.m4a

    In human, I want to define the entire command including parameters. Later in the script, I just have to supply the filename.

    Is this possible?

  2. #2
    Join Date
    May 2007
    Location
    East Yorkshire, England
    Beans
    Hidden!

    Re: zsh: Execute string with command and params

    Use an array:

    Code:
    S=(aacgain -r)
    $S audio.m4a
    Unlike bash, zsh doesn't split strings on spaces when used in a command.
    Website | Blog | The Arch Hurd Project

    If you want to ask about something I posted, send a PM, as I don't watch many threads

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •