Multiple choice technology architecture

What will be output for the following cut command taking as input the below file? $cat file 2273|ravi |chennai |ind $cut –d’|’ -f 2 file

  1. 2273

  2. chennai

  3. ravi

  4. None

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The cut command with -d'|' sets pipe as the delimiter and -f 2 extracts the second field. From the input '2273|ravi|chennai|ind', the fields are: field1=2273, field2=ravi, field3=chennai, field4=ind. So output is 'ravi'.