how to find the 51th record of a file containing 100 records
in unix.
Answers were Sorted based on User's Feedback
Answer / sundar octavious
head -51 <filename> |tail -1
The above command will display the answer.
| Is This Answer Correct ? | 33 Yes | 1 No |
What is a bash command?
When i run a programm of orphan process. Instead of getting child's parent (ppid)=1 ..i get 1400 and it varies as per system. How can i findthe right soluion??? My pgm: #include<stdlib.h> # include <stdio.h> int main() { int pid; pid=fork(); if(pid < 0) {exit(-1);} else if(pid==0) { printf("Child Process is Sleeping ..."); sleep(10); printf("Orphan Child's Parent ID : %u ",getppid()); } else { printf("Parent Process Completed ... %u ",getpid()); exit(0); } return 0; } Output:
Is there any method to erase all files in the current directory, along with its all sub-directories, by using only one command?
What is an Unix command to convert HEX value to ASCII value located in any flat file.
how to find the 51th record of a file containing 100 records in unix.
How does shebang work?
Describe the zip/unzip command using gzip.
What is used to type command?
The command grep first second third /usr/you/myfile a) prints lines containing the words first, second or third from the file /usr/you/myfile b) searches for lines containing the pattern first in the files second, third, and /usr/you/myfile and prints them c) searches the files /usr/you/myfiel and third for lines containing the words first or second and prints them d) replaces the word first with the word second in the files third and /usr/you/myfile e) None of the above
How do you stop a running process?
How can we "forked" process in UNIX? How then recognize in any of the branches we?
What are Unix processes, and how do you manage them?