Find the answer to your Linux question:
Results 1 to 3 of 3
Hi All, Following line: Code: CURVOL=`cat ~/.pulse/volume` I'm getting the following error: /bin/bash: line 10: cat ~/.pulse/volume: syntax error in expression (error token is "~/.pulse/volume") Thanks in advance Edit: Now ...
  1. #1
    Linux Guru jmadero's Avatar
    Join Date
    Jul 2007
    Location
    California
    Posts
    1,958

    Reall Simple Variable Question

    Hi All,

    Following line:

    Code:
    CURVOL=`cat ~/.pulse/volume`
    I'm getting the following error:

    /bin/bash: line 10: cat ~/.pulse/volume: syntax error in expression (error token is "~/.pulse/volume")


    Thanks in advance


    Edit: Now it's passing on literally "cat ~/.pulse/volume" to the variable (not the integer that is inside of the file which is what I need to get to)
    Last edited by jmadero; 02-10-2012 at 06:43 PM.
    Bodhi 1.3 & Bodhi 1.4 using E17
    Dell Studio 17, Intel Graphics card, 4 gigs of RAM, E17

    "The beauty in life can only be found by moving past the materialism which defines human nature and into the higher realm of thought and knowledge"

  2. #2
    Just Joined!
    Join Date
    Aug 2011
    Posts
    48
    If bash, you could try
    Code:
    CURVOL=$(cat ~/.pulse/volume)

  3. #3
    Linux Guru jmadero's Avatar
    Join Date
    Jul 2007
    Location
    California
    Posts
    1,958
    That did it, thanks histrungalot, weird that the people over in the arch forum said that the one I had worked great but in Bodhi I needed the way you have it. Thanks again
    Bodhi 1.3 & Bodhi 1.4 using E17
    Dell Studio 17, Intel Graphics card, 4 gigs of RAM, E17

    "The beauty in life can only be found by moving past the materialism which defines human nature and into the higher realm of thought and knowledge"

Posting Permissions

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