Link to home
Start Free TrialLog in
Avatar of Dead_Eyes
Dead_EyesFlag for United Kingdom of Great Britain and Northern Ireland

asked on

powershell syntax error

I am having issues with a script sent to me by a friend (think it is becasue it was written in powershell v1)
the error is:

The '<' operator is reserved for future use.
At F:\test.ps1:159 char:13
+ "Press the < <<<< < space >> bar to start playing."
    + CategoryInfo          : ParserError: (<:OperatorToken) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : RedirectionNotSupported

The Code is:
"Press the << space >> bar to start playing."
Thanks in advance
ASKER CERTIFIED SOLUTION
Avatar of slidingfox
slidingfox
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Dead_Eyes

ASKER

Still the same error :(
The '<' operator is reserved for future use.
At F:\pig.ps1:159 char:16
+ "Press the '<'< <<<<  space >> bar to start playing."
    + CategoryInfo          : ParserError: (<:OperatorToken) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : RedirectionNotSupported
I think you've used the wrong key. the back tick is at the top right of the keyboard, usually its the same key as ¬. the character you want will slant back a bit like so.  `

You might have to put it by all the < and > symbols, as > and >> can be used to redirect output.
My bad you are right :(. thanks
You could also try using a single quote marks to delimit the string rather than double quotes,