Skip to content
Advertisement

Tag: grep

Filter out number from a specific line in log file

I have got a log file with specific String Need to get the specific number which is at the end of line. We can use awk or grep , not able to get this using below command. Since the log file has timestamp at the beginning. Answer Awk lets you easily grab the last element on a line. The variable

A confusion about the alias area of bashrc file

I want write my own alias called oepnserver. The functions of the oepnserver are: show my ip address use python module to start a server on current folder. The detailed code is listed below: When I type oepnserver, my terminal only shows: However, my expectation was I also try to use the ifconfig wlan0 |grep inet |awk ‘{print $2}’ along,

Linux Internal Process for Cat and Grep [closed]

Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 2 years ago. Improve this question I’m newbie to linux back round process, for example i have the below linux command, Maybe the question will duplicate here but i couldn’t find

How do i extract some particular words from each line?

The text file has many lines of these sort , i want to extract the words after /videos till .mp4 and the very last number ( shown in bold ) and output each filtered line in a separate file Lets say for example the text file content is .. The output should be Answer You may try the below regex:

Advertisement