Recent questions tagged shell-script

1.4k
views
1 answers
1 votes
Which of the following UNIX/Linux pipes will count the number of lines in all the files having .c and .h as their extension in the current working directory?cat $* \cdot$ ch $ \: \mid$ ... $-1$cat $* \cdot [$ ch $] \: \mid$ wc $-1$
552
views
0 answers
0 votes
Provide short answers to the following questions:Consider the following sequence of UNIX commands:grep main a.c b.c c.c > grepout & wc < grepout & rm grepout &Why is this not equivalent to the following?grep main a.c.b.c c.c | wc
4.3k
views
1 answers
3 votes
In Unix, files can be protected by assigning each one a 9-bit mode called rights bits, now, consider the following two statements:A mode of 641 (octal) ... I is correctOnly II is correctBoth I and II are correctBoth I and II are incorrect
3.1k
views
1 answers
2 votes
Which of the following statements is not correct with reference to cron daemon in UNIX OS?The cron daemon is the standard tool for running commands on ... lines and the times at which they invokedCrontab for individual users are not stored
1.9k
views
1 answers
4 votes
The unix command: ... ' command to move between the filesEdits file1 first, saves it and then edits file2
2.4k
views
1 answers
1 votes
What does the following command do? grep -vn "abc" xIt will print all of the lines in the file x that match the search string "abc"It will print all of the ... specific line numbers of the file x in which there is a match for string "abc"
3.6k
views
1 answers
1 votes
Which of the following statements is not true for UNIX Operating System?Major strength of UNIX Operating System is its open standards which enables large ... O devices and files. The directories structure used is directed acyclic graph.
1.7k
views
1 answers
3 votes
Which of the following shell scripts will produce the output my first script ?for i in my first script { echo -i ... ; do echo -i $i; donefor n in my first script; do echo -i $i; done
1.7k
views
1 answers
0 votes
Match the following with reference to Unix shell scripts $:$ ... $\text{a-i, b-iii, c-i, d-iv}$
2.1k
views
1 answers
0 votes
Which of the following commands will output &ldquo;onetwothree&rdquo; ?for val; do echo-n $val; done < one two threefor one two three; do echo-n-; donefor n in one two three; do echo-n $n; donefor n in one two three {echo &ndash;n $ n}
621
views
0 answers
0 votes
Which of the following commands willoutput “onetwothree” ?(A) for val; do echo-n \$val; done <one two three(B) for one two three; do echo-n-;done(C) for n in one two three; do echo-n \$n; done(D) for n in one two three {echo –n \$ n}
3.4k
views
2 answers
7 votes
The shell commandfind -name passwd -printis executed in /etc directory of a computer system running Unix. Which of the following shell commands will ... executed in the same directory?ls passwdcat passwdgrep name passwdgrep print passwd
4.3k
views
2 answers
9 votes
A student wishes to create symbolic links in a computer system running Unix. Three text files named $``\text{file 1}", ``\text{file 2}"$ and ... from her file system?HobbiesFriendsCoursesI and II onlyII and III onlyII onlyI and III only
1.6k
views
1 answers
1 votes
The contents of the text file t1 txt containing four lines are as follows :a1 b1a2 b2a3 b2a4 b1The contents of the text file t2 ... given strings may be substrings of a printed line.)"b1 c1""b2 c3""b1 c2""b1 c3"
To see more, click for the full list of questions or popular tags.