SED command in UNIX is stands for stream editor and it can perform
lot’s of function on file like, searching, find and replace, insertion
or deletion. Though most common use of SED command in UNIX is for
substitution or for find and replace. By using SED you can edit files
even without opening it, which is much quicker way to find and replace
something in file, than first opening that file in VI Editor and then
changing it.
Showing posts with label Unix filter command. Show all posts
Showing posts with label Unix filter command. Show all posts
Sunday, 10 June 2018
Saturday, 9 June 2018
Filters and commands: cut command in Unix systems with examples
The cut command in UNIX is a command for cutting out the sections from
each line of files and writing the result to standard output. It can be
used to cut parts of a line by byte position, character and field.
Basically the cut command slices a line and extracts the text. It is
necessary to specify option with command otherwise it gives error.
Filters and commands: Tail command in Unix systems with examples
The tail command, as the name refers that it display the last N
lines of given input content. By default, the value of N is 10 lines.
While no option is mentioned in command then it display last 10 lines of the file
content.
~$ man tail (on Linux ubuntu 16.10)

~$ man tail (on Linux ubuntu 16.10)

~$cat testfile4 // display content of testfile4
~$ tail -5 testfile4 // displays last five lines of the content of the file
~$ awk 'END { print NR }' testfile4 // no of lines in testfile4
~$ tail -n +14 testfile4 // displays last 7 lines starting from the line No. 14
~$ tail -c -5 testfile4 // displays last five bytes of the file
~$ tail -c +100 testfile4 // displays last 23 bytes starting from the byte No. 100
~$tail -f testfile3 // display live content of testfile3 (logfile)
In case, if user want to see log content of log-file of some currently running process. For example, Android studio log file is generated and can be seen while App is debugging.
Subscribe to:
Posts (Atom)
UGC NET Computer Science December 2019 | Question 16
Question 16 In a certain coding language. 'AEIOU' is written as 'TNHDZ'. Using the same coding language. 'BFJPV' wil...
Popular Posts
-
Question 1 1. An organization has a Class B Network and need to form subnet for 64 departments what would be the appropriate Subnet...
-
Find here a public notice regarding Updated NTA UGC NET Syllabus June 2019 or Visit NTA NET Home page "CURRENT EVENT" -> ...
-
Question 1 The number of different spanning trees in complete graph, K4 and bipartite graph, K2,2 have ______ and _______ respectively. 1. 1...
-
UGC NET 2021 Paper 1 Syllabus The University Grants Commission (UGC) National Eligibility Test (NET) is conducted to determine the eligi...
-
1. How many are there to place 8 indistinguishable balls into four distinguishable bins? A 70 B 165 C 8 C 4 D 8 P 4 ANS. B ...
-
Question 42 The major barriers for access to higher education in India are : (a) more opportunities of employment for less educated (b) gove...
-
The table below embodies data on the production, exports and per capita consumption of rice in country P for the five years from 2012 to 2...
-
Question 122 Which of the following are legal statements in C programming language? (a) int * P= &44 ; (b) int * P= &r ; (c) int P= ...
-
Question 1 1. The definitions in an XML document are said to be __________ when the tagging system and definitions in the DTD are all...
-
17. The parallel bus arbitration technique uses an external priority encoder and a decoder. Suppose, a parallel arbiter has 5 bus arbiters...






