Skip to content

Tutorial Guruji

Online Free Tutorials Guruji Guide & Materials – Solved Questions Answers

  • Home
  • Tutorials
    • Java
    • DBMS
    • Linux
    • for loop
    • Bitcoin Transaction Fees
    • Mathematics Real Analysis
    • Shell Script
    • Bitcoin Core
    • Bitcoin Security
    • Grammar
  • About Us
  • Contact Us
Home » grep

Tag: grep

Find Total Number of Repetetions of numbers in a file

Linux July 23, 2020

I have a file with a string Global=x , where x is a number in between lines of text. I want to calculate the total number of repetitions of the number ‘x’ extracted from the string “Global=x”…

Converting a working command into shell script file which gets arguments

Shell Script July 29, 2018

Hi my working command is: grep -l “my text” file*.ext|xargs ls -lart this command is very useful for me and I wanted to create a shell file which does it with fewer typing, like this: fn “my text” …

filter date from a partiicular column (from the last 3rd column) of a csv file. Also if the last 3rd column is empty then print lines

Linux October 24, 2017

Input csv file is 23,54,one,tree,56,23,7/20/2017 17:00,iii,89 23,54,one,tree,56,23,7/20/2017 17:00,iii,89 23,54,one,tree,56,23,7/21/2017 17:00,iii,89 23,54,one,tree,56,23,7/30/2017 17:00,iii,89 Need …

Generating strings of words with space delimiters from cut statement

Shell Script June 24, 2016

I am new to bash. When I run the following command: grep “type” /root/myFile | cut-d’=’ -f2 I get the following: 102 304 503 442 I want to store the contents of the first command into a variable …

Extracting a date from a log file and creating a file with unique dates

Shell Script May 24, 2016

I would like to extract from a file the date with format DD.MM.YYYY, date is always in the first place, here an example of the entries 15.04.2016 13:13:30,228 INFO [wComService] [[email protected]/…

Prefix and suffix strings to each output line from command

Shell Script December 24, 2015

I have ran into a problem trying to write a Bash script. When grep outputs, it returns (usually) many lines. I would like to prefix and suffix a string to each of these output lines. I would also …

Conditional Check for IPTables

Shell Script September 21, 2015

I am trying to check whether specific rules in IPTables exists or not. #!/bin/bash if iptables -L -n | grep — “ACCEPT tcp — 0.0.0.0/0 0.0.0.0/0 tcp dpt:8880”; then …

How to remove a line from a tag in shell script?

Shell Script September 17, 2015

We have an xml file (abc_lop.xml) in which I need to remove a line which is present in a tag: Below is an xml file, I have shorten it down as it is very big. <HELLO version="4.2" xmlns="http://…

How to grep the logs for a list of patterns and make a report out of it?

Shell Script October 27, 2014

I have a C++ executable which scan some of my files and those files has some user id in it. After scanning is completed it generates below log file (abc.log) like this – INFO [0x7faff2b32a00] (/home/…

What is the purpose of those special characters in the sed command? [closed]

Shell Script October 24, 2014

I found this bash command that creates a directory tree in your console window. I find it quite useful, but I don’t really understand how all of the special characters work. Could someone help break …

Posts navigation

Page 1 Page 2 Next page>
Skip to footer

Recent Articles

  • How to use sprite groups and kill sprite group
  • How to automatically “register” methods in a python class as a list class variable?
  • exitFullscreen() function in javascript not working
  • MongoDB Dedupe and Sort using Reduce
  • Assign values column based on a column in another dataframe

What You Want To Learn?

  • Android
  • AngularJS
  • Bitcoin Core
  • Bitcoin Exchanges
  • Bitcoin Security
  • Bitcoin Transaction Fees
  • Bitcoin Transactions
  • C#
  • C++
  • DBMS
  • for loop
  • Grammar
  • HTML
  • Java
  • JavaScript
  • jQuery
  • Linux
  • Mathematics Real Analysis
  • Node.js
  • PHP
  • Python
  • React JS
  • Shell Script
  • Travel
  • WordPress

Contact Details

Web: tutorialguruji.com
For Advertisement - Contact Us Today.
Tutorial Guruji