Skip to main content
deleted 4 characters in body; edited tags
Source Link
αғsнιη
  • 41.9k
  • 17
  • 75
  • 117

For example, if a have the following text in a file on my Linux system:

10-02-2020
given as file name) for lines containing a match to the given PATTERN. By default, grep prints the matching lines.
In addition, two variant programs egrep and fgrep are available. egrep is the same as grep -E. fgrep is the same as grep -F
16-02-2020
The top program provides a dynamic real-time view of a running
       system.  It can display system summary information as well as a list
       of processes or threads currently being managed by the Linux kernel.
       The types of system summary information shown and the types, order
       and size of information displayed for processes are all user
       configurable and that configuration can be made persistent across
       restarts.

How Cancan I delete all text before 16-02-202016-02-2020 and turn the file into this:

    16-02-2020
The top program provides a dynamic real-time view of a running
       system.  It can display system summary information as well as a list
       of processes or threads currently being managed by the Linux kernel.
       The types of system summary information shown and the types, order
       and size of information displayed for processes are all user
       configurable and that configuration can be made persistent across
       restarts.

For example, if a have the following text in a file on my Linux system:

10-02-2020
given as file name) for lines containing a match to the given PATTERN. By default, grep prints the matching lines.
In addition, two variant programs egrep and fgrep are available. egrep is the same as grep -E. fgrep is the same as grep -F
16-02-2020
The top program provides a dynamic real-time view of a running
       system.  It can display system summary information as well as a list
       of processes or threads currently being managed by the Linux kernel.
       The types of system summary information shown and the types, order
       and size of information displayed for processes are all user
       configurable and that configuration can be made persistent across
       restarts.

How Can I delete all text before 16-02-2020 and turn the file into this:

    16-02-2020
The top program provides a dynamic real-time view of a running
       system.  It can display system summary information as well as a list
       of processes or threads currently being managed by the Linux kernel.
       The types of system summary information shown and the types, order
       and size of information displayed for processes are all user
       configurable and that configuration can be made persistent across
       restarts.

For example, if a have the following text in a file on my Linux system:

10-02-2020
given as file name) for lines containing a match to the given PATTERN. By default, grep prints the matching lines.
In addition, two variant programs egrep and fgrep are available. egrep is the same as grep -E. fgrep is the same as grep -F
16-02-2020
The top program provides a dynamic real-time view of a running
       system.  It can display system summary information as well as a list
       of processes or threads currently being managed by the Linux kernel.
       The types of system summary information shown and the types, order
       and size of information displayed for processes are all user
       configurable and that configuration can be made persistent across
       restarts.

How can I delete all text before 16-02-2020 and turn the file into this:

16-02-2020
The top program provides a dynamic real-time view of a running
       system.  It can display system summary information as well as a list
       of processes or threads currently being managed by the Linux kernel.
       The types of system summary information shown and the types, order
       and size of information displayed for processes are all user
       configurable and that configuration can be made persistent across
       restarts.
added 238 characters in body
Source Link
Astora
  • 519
  • 1
  • 6
  • 20

For example, if a have the following text in a file on my Linux system:

10-02-2020
given as file name) for lines containing a match to the given PATTERN. By default, grep prints the matching lines.
In addition, two variant programs egrep and fgrep are available. egrep is the same as grep -E. fgrep is the same as grep -F
16-02-2020
The top program provides a dynamic real-time view of a running
       system.  It can display system summary information as well as a list
       of processes or threads currently being managed by the Linux kernel.
       The types of system summary information shown and the types, order
       and size of information displayed for processes are all user
       configurable and that configuration can be made persistent across
       restarts.

How Can I delete all text afterbefore 16-02-2020 and turn the file into this:

10    16-02-2020
givenThe astop fileprogram name)provides fora linesdynamic containingreal-time view of a matchrunning
 to the given PATTERN   system. By default,It grepcan printsdisplay system summary information as well as a list
       of processes or threads currently being managed by the matchingLinux lineskernel.
In addition      The types of system summary information shown and the types, twoorder
 variant programs egrep    and fgrepsize of information displayed for processes are available.all egrepuser
 is the same as grep -E. fgrepconfigurable isand thethat sameconfiguration ascan grepbe -Fmade persistent across
       restarts.

For example, if a have the following text in a file on my Linux system:

10-02-2020
given as file name) for lines containing a match to the given PATTERN. By default, grep prints the matching lines.
In addition, two variant programs egrep and fgrep are available. egrep is the same as grep -E. fgrep is the same as grep -F
16-02-2020
The top program provides a dynamic real-time view of a running
       system.  It can display system summary information as well as a list
       of processes or threads currently being managed by the Linux kernel.
       The types of system summary information shown and the types, order
       and size of information displayed for processes are all user
       configurable and that configuration can be made persistent across
       restarts.

How Can I delete all text after 16-02-2020 and turn the file into this:

10-02-2020
given as file name) for lines containing a match to the given PATTERN. By default, grep prints the matching lines.
In addition, two variant programs egrep and fgrep are available. egrep is the same as grep -E. fgrep is the same as grep -F

For example, if a have the following text in a file on my Linux system:

10-02-2020
given as file name) for lines containing a match to the given PATTERN. By default, grep prints the matching lines.
In addition, two variant programs egrep and fgrep are available. egrep is the same as grep -E. fgrep is the same as grep -F
16-02-2020
The top program provides a dynamic real-time view of a running
       system.  It can display system summary information as well as a list
       of processes or threads currently being managed by the Linux kernel.
       The types of system summary information shown and the types, order
       and size of information displayed for processes are all user
       configurable and that configuration can be made persistent across
       restarts.

How Can I delete all text before 16-02-2020 and turn the file into this:

    16-02-2020
The top program provides a dynamic real-time view of a running
       system.  It can display system summary information as well as a list
       of processes or threads currently being managed by the Linux kernel.
       The types of system summary information shown and the types, order
       and size of information displayed for processes are all user
       configurable and that configuration can be made persistent across
       restarts.
edited tags; fixed question so it asks for the output you show
Source Link
terdon
  • 252.3k
  • 69
  • 480
  • 718

For example, if a have the following text in a file on my Linux system:

10-02-2020
given as file name) for lines containing a match to the given PATTERN. By default, grep prints the matching lines.
In addition, two variant programs egrep and fgrep are available. egrep is the same as grep -E. fgrep is the same as grep -F
16-02-2020
The top program provides a dynamic real-time view of a running
       system.  It can display system summary information as well as a list
       of processes or threads currently being managed by the Linux kernel.
       The types of system summary information shown and the types, order
       and size of information displayed for processes are all user
       configurable and that configuration can be made persistent across
       restarts.

How Can I delete all text beforeafter 16-02-2020 and turn the file into this:

10-02-2020
given as file name) for lines containing a match to the given PATTERN. By default, grep prints the matching lines.
In addition, two variant programs egrep and fgrep are available. egrep is the same as grep -E. fgrep is the same as grep -F

For example, if a have the following text:

10-02-2020
given as file name) for lines containing a match to the given PATTERN. By default, grep prints the matching lines.
In addition, two variant programs egrep and fgrep are available. egrep is the same as grep -E. fgrep is the same as grep -F
16-02-2020
The top program provides a dynamic real-time view of a running
       system.  It can display system summary information as well as a list
       of processes or threads currently being managed by the Linux kernel.
       The types of system summary information shown and the types, order
       and size of information displayed for processes are all user
       configurable and that configuration can be made persistent across
       restarts.

How Can I delete all text before 16-02-2020 and turn the file into this:

10-02-2020
given as file name) for lines containing a match to the given PATTERN. By default, grep prints the matching lines.
In addition, two variant programs egrep and fgrep are available. egrep is the same as grep -E. fgrep is the same as grep -F

For example, if a have the following text in a file on my Linux system:

10-02-2020
given as file name) for lines containing a match to the given PATTERN. By default, grep prints the matching lines.
In addition, two variant programs egrep and fgrep are available. egrep is the same as grep -E. fgrep is the same as grep -F
16-02-2020
The top program provides a dynamic real-time view of a running
       system.  It can display system summary information as well as a list
       of processes or threads currently being managed by the Linux kernel.
       The types of system summary information shown and the types, order
       and size of information displayed for processes are all user
       configurable and that configuration can be made persistent across
       restarts.

How Can I delete all text after 16-02-2020 and turn the file into this:

10-02-2020
given as file name) for lines containing a match to the given PATTERN. By default, grep prints the matching lines.
In addition, two variant programs egrep and fgrep are available. egrep is the same as grep -E. fgrep is the same as grep -F
Source Link
Astora
  • 519
  • 1
  • 6
  • 20
Loading