User Tools

Site Tools


os_cp:redirects_pipes:solutions

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
os_cp:redirects_pipes:solutions [2023/03/22 08:45] – jkonczakos_cp:redirects_pipes:solutions [2023/03/22 10:37] (current) – jkonczak
Line 19: Line 19:
 |~~#~~|cp /etc/services . \\ hexdump <>services 1>&0 \\ # hexdump reads a chunk of data, outputs (in the middle of the file) the hex dump, \\ # and repeats this until it processes whole file. | |~~#~~|cp /etc/services . \\ hexdump <>services 1>&0 \\ # hexdump reads a chunk of data, outputs (in the middle of the file) the hex dump, \\ # and repeats this until it processes whole file. |
 |~~#~~|cat /etc/motd /etc/shadow 3>&1 1>&2 2>&3 <nowiki>|</nowiki> rev | |~~#~~|cat /etc/motd /etc/shadow 3>&1 1>&2 2>&3 <nowiki>|</nowiki> rev |
-|~~#25~~|echo //'some text'// <nowiki>|</nowiki> xxd|+|~~#25~~|echo '2+2*2' <nowiki>|</nowiki> bc| 
 +|~~#~~|echo //'some text'// <nowiki>|</nowiki> xxd|
 |~~#~~|ls <nowiki>|</nowiki> cat \\ ls <nowiki>|</nowiki> cat -n| |~~#~~|ls <nowiki>|</nowiki> cat \\ ls <nowiki>|</nowiki> cat -n|
 |~~#~~|ps -eF <nowiki>|</nowiki> fold| |~~#~~|ps -eF <nowiki>|</nowiki> fold|
Line 29: Line 30:
 |~~#~~|mount <nowiki>|</nowiki> cut -f 5 -d ' ' \\  cut -f 3 -d ' ' /etc/mtab | |~~#~~|mount <nowiki>|</nowiki> cut -f 5 -d ' ' \\  cut -f 3 -d ' ' /etc/mtab |
 |~~#~~|egrep '<nowiki>^</nowiki>[Ee]{2}' /usr/share/myspell/en_US.dic <nowiki>|</nowiki> cut -f1 -d/ | |~~#~~|egrep '<nowiki>^</nowiki>[Ee]{2}' /usr/share/myspell/en_US.dic <nowiki>|</nowiki> cut -f1 -d/ |
-|~~#36~~|cat random_data \\ sort random_data|+|~~#37~~|cat random_data \\ sort random_data|
 |~~#~~|sort -k3 random_data \\ sort -nk3 random_data | |~~#~~|sort -k3 random_data \\ sort -nk3 random_data |
 |~~#~~|sort -k2,2 -k6,6 random_data | |~~#~~|sort -k2,2 -k6,6 random_data |
Line 35: Line 36:
 |~~#~~|sort -k2,2 -k3,3n random_data| |~~#~~|sort -k2,2 -k3,3n random_data|
 |~~#~~|man wc <nowiki>|</nowiki> cat \\ man wc <nowiki>|</nowiki> wc| |~~#~~|man wc <nowiki>|</nowiki> cat \\ man wc <nowiki>|</nowiki> wc|
-|~~#43~~|perl -e 'printf "%d\n", (int rand(6)+1)+(int rand(6)+1) for(1..100)' <nowiki>|</nowiki> uniq -cd \\ perl -e 'printf "%d\n", (int rand(6)+1)+(int rand(6)+1) for(1..10000)' <nowiki>|</nowiki> sort -n <nowiki>|</nowiki> uniq -c |+|~~#44~~|perl -e 'printf "%d\n", (int rand(6)+1)+(int rand(6)+1) for(1..100)' <nowiki>|</nowiki> uniq -cd \\ perl -e 'printf "%d\n", (int rand(6)+1)+(int rand(6)+1) for(1..10000)' <nowiki>|</nowiki> sort -n <nowiki>|</nowiki> uniq -c |
 |~~#~~|echo -e '1 2 3\n4 5 6\n7 8 9' \\ echo -e '1 2 3\n4 5 6\n7 8 9'  <nowiki>|</nowiki> rev \\ echo -e '1 2 3\n4 5 6\n7 8 9'  <nowiki>|</nowiki> tac | |~~#~~|echo -e '1 2 3\n4 5 6\n7 8 9' \\ echo -e '1 2 3\n4 5 6\n7 8 9'  <nowiki>|</nowiki> rev \\ echo -e '1 2 3\n4 5 6\n7 8 9'  <nowiki>|</nowiki> tac |
-|~~#~~|Work in progress... \\ <nowiki>|</nowiki>| +|~~#~~|ls -l <nowiki>|</nowiki> tr '0-9' '-' \\ ls -l <nowiki>|</nowiki> tr '[:lower:]' '[:upper:]' \\ # or     ls -l <nowiki>|</nowiki> tr 'a-z' 'A-Z' \\ ls -l <nowiki>|</nowiki> tr -s ' ' ' ' \\ ls -l <nowiki>|</nowiki> tr -d 'rwx'| 
-|~~#~~|<nowiki>|</nowiki>| +|~~#48~~|less /usr/share/doc/packages/apparmor-docs/techdoc.pdf \\ less -L /usr/share/doc/packages/apparmor-docs/techdoc.pdf \\ less /usr/share/doc/packages/automake/amhello-1.0.tar.gz \\ less /usr/include| 
-|~~#~~|<nowiki>|</nowiki>| +|~~#~~|tree <nowiki>|</nowiki> tee //file// \\ less //file//|
-|~~#~~|<nowiki>|</nowiki>| +
-|~~#~~|<nowiki>|</nowiki>|+
  
 <html></code></html> <html></code></html>
os_cp/redirects_pipes/solutions.1679474707.txt.gz · Last modified: (external edit)