The output indicates that fred is logged on, while we were checking to see whether ed was logged on. Modify ison to correct this problem.

The program ison from this chapter has a shortcoming as shown in the following example:
$ ison ed
fred tty03 Sep 4 14:53

The best way to fix this is to turn the pattern into a regular expression. Most versions of grep require that you use the '-E' flag to force evaluation of the specified pattern as a regex, however, so the best answer is:
who | grep -E "^$1[^a-z]"
You could also solve it with "^$1 " but the non-alpha pattern is more robust.

Computer Science & Information Technology

You might also like to view...

If you are using a table that contains appended records and the primary key is not defined, carefully check the ________ of the data

A) sensitivity B) values C) integrity D) data type

Computer Science & Information Technology

What is the name of the function to convert from a c-string that contains only digits to an integer?

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology