Find the answer to your Linux question:
Results 1 to 2 of 2
All I need to do is consider a file as a variable, or at least make a variable by looking at a file. I don't see why this doesn't work, ...
  1. #1
    Just Joined!
    Join Date
    Oct 2004
    Posts
    7

    Get variable from file "[: too many arguments"

    All I need to do is consider a file as a variable, or at least make a variable by looking at a file. I don't see why this doesn't work, or another way around it:

    Code:
    ONE='cat pressure-bournemouth-variablised/1'
    
    
    THRESHOLD=780
    
    if [ $ONE -lt $THRESHOLD ]
    then
    	echo "YES"
    	echo $ONE
    else 
    	echo "NO"
    fi
    What have I done wrong?

  2. #2
    Just Joined!
    Join Date
    Jul 2009
    Posts
    58
    Are you trying to put the content of xxx'/l into a $ONE?

    ONE = `cat whatever/l`

    It's tick ` vs single quote '

Posting Permissions

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