Your browser does not allow storing cookies. We recommend enabling them.

SSH

Character Sets For Egrep

A character set starts with '[' and ends at non-escaped ']' that is not part of a POSIX character set specifier and that does not follow immediately after '['.

The following characters have a special meaning and need to be escaped if meant literally:

- (minus sign)

A range operator, except immediately after '[', where it loses its special meaning.

^

If immediately after the starting '[', denotes a complement: the whole character set will be complemented. Otherwise literal '^'.

[:alnum:]

Characters for which 'isalnum' returns true .

[:alpha:]

Characters for which 'isalpha' returns true .

[:cntrl:]

Characters for which 'iscntrl' returns true .

[:digit:]

Characters for which 'isdigit' returns true .

[:graph:]

Characters for which 'isgraph' returns true .

[:lower:]

Characters for which 'islower' returns true .

[:print:]

Characters for which 'isprint' returns true .

[:punct:]

Characters for which 'ispunct' returns true .

[:space:]

Characters for which 'isspace' returns true .

[:upper:]

Characters for which 'isupper' returns true .

[:xdigit:]

Characters for which 'isxdigit' returns true .

Example: [[:xdigit:]XY] is typically equivalent to [0123456789ABCDEFabcdefXY] .

It is also possible to include the predefined escaped character sets into a newly defined one, so [\d\s] matches digits and whitespace characters.

Also, escape sequences resulting in literals work inside character sets.


 

 
Highlights from the SSH.COM blog:

  • Cryptomining with the SSH protocol: what big enterprises need to know about it

    Cryptomining malware is primarily thought of as targeting desktops and laptops and is used to hijack system resources to mine cryptocurrency.
    Read more
  • SLAM the door shut on traditional privileged access management

    Did you know that something as trivial-sounding as granting access for your developers or third parties to a product development environment can throw a gorilla-sized monkey wrench into your operations and productivity?
    Read more
  • We broke the IT security perimeter

    Everyone understands the concept of a security perimeter. You only gain access if you are identified and authorized to do so.
    Read more