Uncategorized

sed – stread editor

sed is a mighty tool for editing streams. sed stands for (s)tream (ed)itor.Lets show some examples to get familiar with sed. Lets use the following file (my.txt) for our next examples: Max Müller 1985 Jana Keller 1964 Paul Fröhlich 1993 Peter Keller 1985 Pia Stein 1972 First we want to delete all lines containing the word „Keller“ sed ‚/Keller/d‘ my.txt The sed expression is given as a string and wrapped between slashes. NOtice the d at the end of the…

0
Read More

Regular-expressions

Here you find a list of usefull regular-expressions (regexp) Match lines that have a length between 20 and 30 characters:^.{20,30}$ Match lines that are longer than 300 characters:^.{300,} Match lines that are shorter than 40 characters:^.{,30}$

0
Read More

kali

Set the keyboard layout to german in kalisudo setxkbmap de enumerate some portsnmap -p- –min-rate=1000 -T4 trg.com | grep ^[0-9] > p01cat p01 | cut -d ‚/‘ -f 1 | tr ‚\n‘ ‚,‘ | sed s/,$// > p02nmap -sC -sV -p$(cat p02) trg.com – nmap: scan trg.com with at least 1000 packages per second– grep: take lines starting with 0 to 9 and write them to a file named p01– output the file port and cut all lines after /…

0
Read More