Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 3 of 3

Thread: CLI on Linux

  1. #1
    Junior Member
    Join Date
    Apr 2011
    Posts
    8

    Question CLI on Linux

    Hi all,

    I have a simple question, but can't seem to find the answer:
    I run squeezeboxserver on a Linux host.
    I want to write a small (bash) script that queries for the song "now playing".
    How to ask that in Bash?
    What's the general syntax, and what calls are valid?

    Thanks,
    rolf

  2. #2
    Banned
    Join Date
    Feb 2008
    Location
    flat rock community, ga
    Posts
    2,169
    Quote Originally Posted by rolfb View Post
    Hi all,

    I have a simple question, but can't seem to find the answer:
    I run squeezeboxserver on a Linux host.
    I want to write a small (bash) script that queries for the song "now playing".
    How to ask that in Bash?
    What's the general syntax, and what calls are valid?

    Thanks,
    rolf
    In the webUI, go to Help/Technical Information/The Squeezebox Server Command Line Interface. At the top of the screen is a link to go directly to the command index.

    Your script would probably pipe input to a telnet command that would pipe output to a file. The script could then grep for the result and display it.

    P

  3. #3
    Quote Originally Posted by pski View Post
    Your script would probably pipe input to a telnet command that would pipe output to a file. The script could then grep for the result and display it.
    s/telnet/nc/

    Bash seems terribly primitive, especially since inputs & outputs to the CLI are URI-encoded. I'd recommend using a scripting language that has good web libraries, maybe Perl or Python.
    http://www.tux.org/~peterw/
    Note: The best way to reach me is email or PM, as I don't spend time on the forums.
    Free plugins: AllQuiet Auto Dim/AutoDisplay BlankSaver ContextMenu DenonSerial
    FuzzyTime KidsPlay KitchenTimer PlayLog PowerCenter/BottleRocket SaverSwitcher
    SettingsManager SleepFade StatusFirst SyncOptions VolumeLock

Tags for this Thread

Posting Permissions

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