
ASCII art of letters, with the letters using their own characters
Apr 5, 2017 · A BBBBBB CCCCC A A B B C C A A B B C A A BBBBBB C AAAAAAA B B C A A B B C C A A BBBBBB CCCCC or better yet, something more compact, like: A BBBB CCCC A A B B C A A BBBB C AAAAA B B C A A BBBB CCCC ? What's the simplest way to make that happen?
text processing - Finding two patterns in a line and remove the ...
Nov 18, 2021 · Consider this program: awk '{n=index($0,"BBBB"); print substr($0,n+4)}' input.txt This will locate the first occurence of the substring BBBB in the current line (denoted by $0) and store the position in n. It will then print the part of the line starting at this position plus 4 (to remove the initial 4 B s) up to the end of the line.
Why am I getting this output in from sort? [closed]
Jun 12, 2018 · <<<<<<<<B<<<B<<<B<<<<<<<<B<B<<<<B<B<B<B<<<<<B<<<<B<<<<BB<<<BB<<<BBB<B<B<BBBB<B<B<BBB<BBB<BB<B<B<<BBB<BBB<BBBBB<B<0BBBBBBBB<<70 Why is there a gap between the @ERR894725.10000000/1 group and the @ERR894725.10000000/2 one?
comparing 2 files in csv based on few columns and replace one …
Nov 9, 2022 · Using Miller (mlr) to perform a relational JOIN operation on the named fields that the two files have in common: $ mlr --csv join -j AAAA,BBBB,CCCC,DDDD,EEEE,FFFF,GGGG,HHHH -f file1.csv file2.csv AAAA,BBBB,CCCC,DDDD,EEEE,FFFF,GGGG,HHHH,IIII a,b,c,d,e,f,g,h,i …
What $ {var/a/b/\c} means? - Unix & Linux Stack Exchange
> bbbb Thus in your first example your parameter was "a/b" and you told bash to replace the first occurence of "b" in "a/b" (the value of var) with the string "c/d" (which results in "a/c/d").
Reformat delimited file with rows splitted into multiple lines
Jun 14, 2019 · I have an input like this: FIELD1 FIELD2 FIELD3 FIELD4 aaaa bbbb cccc dddd eeee ffff gggg hhhh iiii jjjj kk llll kk It should be a space separated l...
What is the proper way to display IPv6 Addresses in /etc/hosts
Apr 11, 2018 · Hey Michael, I totally get this. My work uses a highly customized RHEL6.x / 7.x Image. I've been running across hosts with the IPv6 address stated in both ways above. I've never messed with IPv6 on Windows or Linux, so this is a bit new to me. I guess it would be correct to assume that; gateway_ip:last_hextet of the IPv6 address goes here (2001:db8:2::1:1000). This …
The simplest method to count lines matching specific patterns ...
For example: aaaa bbbb cccc dddd eeee ffff The log files can look like this: asd dfg aaaa aaaa sa sdf dddd dddd dddd dddd ghj bbbb cccc cccc cccc fgg fgh hjk The first (and perhaps most obvious approach) is to use grep, sort and uniq in the following way: grep -f patterns.in logfile.txt | sort | uniq -c which gives the following result: 2 aaaa ...
sed - Tell a regex expression to skip the beginning of a line before ...
I only want it to match ./aaaa/bbbb/cccc/ but I can't figure out how to do it. I want to specifically match/find all occurrences of "everything before a forward slash up to and including the slash" as I want to use sed to substitute the matches like in the below sed command but not losing the file size bit at the start.
text processing - grep one line before the match plus the match
You can do: grep -B 1 '&$' your_file This will look for lines ending in &, remove $ to match lines with & anywhere in them. The -B switch tells grep to output "context" lines that come before the lines that match. In this case, since you want one line of context, you need -B 1.