I'm not sure how to express this using the csh string matching syntax. I want to test whether a csh variable contains a newline. I'm basically looking for:
if ($mystr !~ <pattern for strings which contain a newline character>)
Edit: in my particular case, I am trying to make a string like this pass:
1234ABC
And a string like this fail:
1234ABC
-------
FOOBAR
These are the output of a sed command, namely sed '1d;$d'. Not sure if that matters.
The reason why I am trying to detect newlines rather than " -------" is for defense against changes in the formatting of the file I'm parsing. (Anyway, I don't think it matters what I'm doing with the file exactly, since I'm just looking for a general solution for detecting a newline character.)
csh? Do you want to check if the string is contained in$mystror if the two are identical?csh, and I just want to check to see if there is a newline character in$mystr.$mystris/contains a specific multiline string or do you just need to check whether$mystrcontains newline character(s)? The two are completely different. Please edit your question and clarify.\nbut have nocshknowledge so I don't know what the match syntax would be or even ifcshcan match.