edited by
2,839 views
1 1 vote

What does the following command do? grep -vn "abc" x

  1. It will print all of the lines in the file x that match the search string "abc"
  2. It will print all of the lines in file x that do not match the search string "abc"
  3. It will print the total number of lines in the file x that match the search string "abc"
  4. It will print the specific line numbers of the file x in which there is a match for string "abc"

1 Answer

1 1 vote
ans is B grep(globally search a regular expression and print it) with -v invert match option display those line which do not contain the specified string
edited by
Answer:
Position:
Show:

Related questions

4 4 votes
1 1 answer
2.3k
2.3k views
go_editor asked Aug 2, 2016
2,254 views
The unix command: $ vi file1 file2Edits file1 and stores the contents of file1 in file2Both files i.e., file1 and file2 can be edited using 'ex' command to travel between...
3 3 votes
2 answers 2 answers
13.2k
13.2k views
go_editor asked Jul 30, 2016
13,244 views
A LRU page replacement is used with $4$ page frames and eight pages. How many page faults will occur with the reference string $0172327103$ if the four frames are initial...
3 3 votes
2 answers 2 answers
10.7k
10.7k views
go_editor asked Jul 30, 2016
10,718 views
A disk drive has $100$ cylinders, numbered $0$ to $99$. Disk requests come to the disk driver for cylinders $12, 26, 24, 4, 42, 8$ and $50$ in that order. The driver is c...
3 3 votes
1 1 answer
2.0k
2.0k views
go_editor asked Jul 24, 2016
2,043 views
Which of the following shell scripts will produce the output “my first script”?for i in my first script { echo –i $i }for my first script; do echo –n; donefor i in my fir...