From 4d037bad46fc1d7904d629461a75118a781977fd Mon Sep 17 00:00:00 2001 From: "matthias@arch" Date: Thu, 8 Dec 2022 01:46:51 +0100 Subject: [PATCH] day 7 --- 7/README.md | 26 ++ 7/day7.sh | 81 ++++ 7/output.txt | 1031 ++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 8 +- 4 files changed, 1143 insertions(+), 3 deletions(-) create mode 100644 7/README.md create mode 100755 7/day7.sh create mode 100644 7/output.txt diff --git a/7/README.md b/7/README.md new file mode 100644 index 0000000..0d1b579 --- /dev/null +++ b/7/README.md @@ -0,0 +1,26 @@ +# [Day 7](https://adventofcode.com/2022/day/7) +:gift::gift::gift::gift::gift::gift::gift: + +Today's language: **Bash** + **awk** + +The way the challenge is laid out is absolutely ridiculus; both tasks could be done in one-liners on a Linux machine in any POSIX shell, +IF the user wasn't as stupid... + +That's why I wrote a bash script that actually creates the whole filesystem from the input-file. +It does so (by default) in `/tmp`. The sizes for the files are only allocated so that `du` shows the filesize, no write operations are taking place. + +The problem is, that (even empty) directories have a size, which also increases with every file and subdirectory in it. +That's why I needed to calculate the sizes of the directories *without* the actual file sizes and subtract that from the output of `du`. +This new output can then be piped into an `awk` one-liner. In reality, this problem wouldn't exist since you would want the total size of a directory anyway. + +If the size of the directories themselves would not matter, the commands would be: +```shell +# Task 1 +du -b / | awk 'BEGIN{sum=0} {if ($1 <= 100000) {sum+=($1)}} END{print "Total size of all dirs<100000: "sum-0}' +# Task 2: min_size = (Update size) - (file system size) - (used size) +du -b / | awk 'BEGIN{file=""; size=99999999} {if ($1 >= min_size && $1 < size) {size=$1; file=$2}} END{print "You should delete "file" size("size")"}' +``` + +```shell +./day7.sh output.txt +``` diff --git a/7/day7.sh b/7/day7.sh new file mode 100755 index 0000000..980c105 --- /dev/null +++ b/7/day7.sh @@ -0,0 +1,81 @@ +#!/bin/bash + +# INPUT=$(pwd)/"output.txt" +INPUT=$(pwd)/$1 +# ROOT_DIR="/tmp/test/root" +ROOT_DIR="/tmp/day7" + +PWD="$ROOT_DIR" + +function pwd_() { + echo $(pwd) | sed "s($ROOT_DIR((" +} + +function createFS() { + mkdir -p "$ROOT_DIR" + rm -r "$ROOT_DIR" + mkdir "$ROOT_DIR" + cd "$ROOT_DIR" + + while read line; do + case $line in + "$ cd "*) + dirname=$(echo $line | awk '{print $3}') + if [[ $dirname == "/" ]]; then + cd "$ROOT_DIR" + continue + fi + # echo ">> cd $dirname" + mkdir -p $dirname || exit 1 + cd $dirname + ;; + "\$ ls") + # echo ">> ls" + ;; + "dir "*) + # echo ">> dir" + ;; + *) # output of ls + file=$(echo $line | awk '{print $2}') + size=$(echo $line | awk '{print $1}') + fallocate -l $(expr $size) $file + # touch $file + ;; + esac + done < $INPUT; +} + +FS_SIZE=70000000 +REQ_SIZE=30000000 + +function getDirsize() { + cd "$ROOT_DIR" + ifs=$IFS; IFS=$'\n' + du_output=($(du -b --apparent-size .)) + # subtract the size of the directory without its contents from the total size + # 40 for dir itself + # 60 for each sub(sub)dir + # 20 for each file in (sub)dir + for (( i = 0; i < "${#du_output[@]}"; i++)) do + line=${du_output[$i]} + dirname=$(echo $line | awk '{print $2}') + size=$(echo $line | awk '{print $1}') + + dirsize=$(ls -ld $dirname | awk '{print $5}') # size of directory without its contents + subfiles=$(find $dirname -type f | wc -l) + subdirs=$(find $dirname -type d | wc -l) + du_output[$i]="$(expr $size + 20 - 60 "*" $subdirs - 20 "*" - $subfiles) $dirname" + done + # printf '%s\n' "${du_output[@]}" + printf '%s\n' "${du_output[@]}" | awk 'BEGIN{sum=0} {if ($1 <= 100000) {sum+=($1)}} END{print "Total size of all dirs<100000: "sum-0}' + IFS=$ifs + ROOT_SIZE=$(echo ${du_output[-1]} | awk '{print $1}') + minSize=$(expr $REQ_SIZE - $FS_SIZE + $ROOT_SIZE) + # echo "minSize $minSize" + + printf '%s\n' "${du_output[@]}" | awk -v min_size=$minSize 'BEGIN{file=""; size=99999999} {if ($1 >= min_size && $1 < size) {size=$1; file=$2}} END{print "You should delete "file" size("size")"}' + +} + +createFS +getDirsize diff --git a/7/output.txt b/7/output.txt new file mode 100644 index 0000000..d61e035 --- /dev/null +++ b/7/output.txt @@ -0,0 +1,1031 @@ +$ cd / +$ ls +dir fchrtcbh +dir hlnbrj +dir jbt +dir nnn +57400 pfqcbp +dir qsdv +dir tdl +dir tmcpgtz +$ cd fchrtcbh +$ ls +dir fct +dir fwttfps +61765 nlr +28736 pfqcbp.pfg +224426 qcmtlbss +145764 sgpmfdlt.tnd +273765 wzmrclw.qbq +$ cd fct +$ ls +dir ctzphlhl +$ cd ctzphlhl +$ ls +25094 cfmw.rdv +$ cd .. +$ cd .. +$ cd fwttfps +$ ls +69990 hdf.fjn +146885 hqrzgvgn.wqp +21206 wzmrclw.qbq +$ cd .. +$ cd .. +$ cd hlnbrj +$ ls +dir mbwgsdcv +$ cd mbwgsdcv +$ ls +156396 rdm.ttb +$ cd .. +$ cd .. +$ cd jbt +$ ls +dir bbm +dir gqbvgbt +dir hzjzlwv +dir jcstr +dir llf +$ cd bbm +$ ls +dir nsshzppb +dir pfqcbp +dir tdz +dir tvqh +$ cd nsshzppb +$ ls +5640 bvpnq.tbm +241745 cmjshlw.qjh +dir jlcqcb +78459 nlfv.dgr +dir pfqcbp +245461 rjftj.gtj +169808 tgvqrvq.mrw +$ cd jlcqcb +$ ls +314748 fzsvgrcw +32649 mmbfqp.lqc +dir nzpvt +dir pmncbz +dir qqtlm +321229 shtc.vtw +10052 tdz +320999 tdz.vfc +$ cd nzpvt +$ ls +dir fct +dir lbsng +209182 nlr +dir pfqcbp +243321 srt.tqh +3325 tdz.dbz +332295 wzmrclw.qbq +$ cd fct +$ ls +185072 drcmppfs +dir fct +92835 nlr +$ cd fct +$ ls +230981 bpnvm +$ cd .. +$ cd .. +$ cd lbsng +$ ls +dir mzsj +116041 nzpvt.nll +$ cd mzsj +$ ls +279834 vshfrzsg +$ cd .. +$ cd .. +$ cd pfqcbp +$ ls +dir fct +173141 mzb.lcd +dir ssbv +$ cd fct +$ ls +33372 tjznm +$ cd .. +$ cd ssbv +$ ls +273126 bccsm.rqq +298840 cqzglqw.ppf +dir fct +dir pmqj +126839 qdvm.wsc +$ cd fct +$ ls +323437 bcqms.cbt +91849 drcmppfs +103408 jbmbrg.ggs +261735 mnfrhs +326197 wvrj.pzg +$ cd .. +$ cd pmqj +$ ls +34310 vhpqwp +$ cd .. +$ cd .. +$ cd .. +$ cd .. +$ cd pmncbz +$ ls +102403 rjhq.blj +$ cd .. +$ cd qqtlm +$ ls +dir ggjzcsfn +dir nzpvt +134921 wzmrclw.qbq +$ cd ggjzcsfn +$ ls +dir nlfv +$ cd nlfv +$ ls +219183 nbfqvdhb.pgr +$ cd .. +$ cd .. +$ cd nzpvt +$ ls +141177 fct.bmj +$ cd .. +$ cd .. +$ cd .. +$ cd pfqcbp +$ ls +312723 ngbm +$ cd .. +$ cd .. +$ cd pfqcbp +$ ls +dir bvsj +120921 cmzmmlqq.pqn +308093 drcmppfs +dir gvndh +151290 hsjgzcf +74851 tdz +294395 wfp.lgp +$ cd bvsj +$ ls +218258 qlnhddbw.pql +dir sdjddn +$ cd sdjddn +$ ls +dir tdl +dir trpcd +$ cd tdl +$ ls +271008 sqdggvm.hbh +$ cd .. +$ cd trpcd +$ ls +119088 wzmrclw.qbq +$ cd .. +$ cd .. +$ cd .. +$ cd gvndh +$ ls +dir bvg +dir hsqmsqt +125116 pfqcbp.fpb +182960 wfp.lgp +$ cd bvg +$ ls +183661 wzmrclw.qbq +$ cd .. +$ cd hsqmsqt +$ ls +dir bmvcv +$ cd bmvcv +$ ls +85871 nlfv +$ cd .. +$ cd .. +$ cd .. +$ cd .. +$ cd tdz +$ ls +dir nzpvt +$ cd nzpvt +$ ls +dir ttcwr +$ cd ttcwr +$ ls +58678 wfp.lgp +$ cd .. +$ cd .. +$ cd .. +$ cd tvqh +$ ls +111924 bccsm.rqq +155539 drcmppfs +dir hvqgrlb +dir njqd +67089 nlr +dir nzpvt +109311 nzpvt.bzz +249415 nzpvt.ptr +dir srq +dir tdz +dir vjdjl +dir zmgzph +$ cd hvqgrlb +$ ls +dir fct +105914 jqtjglmh.glw +94476 mst +180432 nbb.fvv +dir nhnp +dir nlfv +$ cd fct +$ ls +67110 fct +310128 gdzswr.phr +67231 mjbjvb.ngb +285357 vtnlzs.slj +dir zzl +$ cd zzl +$ ls +118330 bccsm.rqq +317825 cchprc +$ cd .. +$ cd .. +$ cd nhnp +$ ls +302625 cwt +319999 htrj.mgt +$ cd .. +$ cd nlfv +$ ls +dir tdz +$ cd tdz +$ ls +127844 bccsm.rqq +$ cd .. +$ cd .. +$ cd .. +$ cd njqd +$ ls +27880 jpscpmzn.thz +dir ntrnlms +dir nzpvt +41048 pfqcbp.qzf +dir vtvwjhm +$ cd ntrnlms +$ ls +15229 sfr +$ cd .. +$ cd nzpvt +$ ls +dir fct +dir ltzw +dir sfwhmn +dir tdz +$ cd fct +$ ls +185362 fddlqjnn +$ cd .. +$ cd ltzw +$ ls +290023 wslq +$ cd .. +$ cd sfwhmn +$ ls +dir jmgzcqvd +159166 mfdhjq +15995 nddsdb.tcg +173881 pqnh.nvt +37665 qnbbmgtl.vcg +275256 tdz.zrs +$ cd jmgzcqvd +$ ls +dir dtr +$ cd dtr +$ ls +dir tdz +$ cd tdz +$ ls +12772 mzmpvqrt +$ cd .. +$ cd .. +$ cd .. +$ cd .. +$ cd tdz +$ ls +dir fgd +dir pfqcbp +dir tdz +137421 vttcn.mgp +308378 wzmrclw.qbq +$ cd fgd +$ ls +75974 gdzrjn +dir zfvwp +$ cd zfvwp +$ ls +48696 nlr +$ cd .. +$ cd .. +$ cd pfqcbp +$ ls +126220 wfp.lgp +68328 zshscwhf.wvm +$ cd .. +$ cd tdz +$ ls +dir gwpps +dir zdbsq +$ cd gwpps +$ ls +193706 bccsm.rqq +$ cd .. +$ cd zdbsq +$ ls +90049 vqwwh +$ cd .. +$ cd .. +$ cd .. +$ cd .. +$ cd vtvwjhm +$ ls +291688 bccsm.rqq +dir dnjgl +17554 drcmppfs +$ cd dnjgl +$ ls +dir lpdzhhf +dir nlfv +dir nmbrz +168524 vbgwhhnq +$ cd lpdzhhf +$ ls +317727 nlfv.wsf +75497 nlr +105712 wfp.lgp +$ cd .. +$ cd nlfv +$ ls +121726 fct.lsw +$ cd .. +$ cd nmbrz +$ ls +14788 bccsm.rqq +dir cjv +64895 cqndrd.rbb +dir fnmsjd +dir hgzgq +dir hst +33320 nlfv.wwb +111373 nlr +271844 nzpvt.llp +dir pfqcbp +$ cd cjv +$ ls +108233 wfp.lgp +$ cd .. +$ cd fnmsjd +$ ls +108902 drcmppfs +dir fbnmdwmw +dir jzq +dir tdz +$ cd fbnmdwmw +$ ls +183892 wzmrclw.qbq +$ cd .. +$ cd jzq +$ ls +dir nzpvt +$ cd nzpvt +$ ls +34417 gjqc +$ cd .. +$ cd .. +$ cd tdz +$ ls +dir cmnw +$ cd cmnw +$ ls +224596 nzpvt +$ cd .. +$ cd .. +$ cd .. +$ cd hgzgq +$ ls +260727 bbqfd.cnm +dir nzpvt +302916 rclhngqn.dvh +dir rhqj +dir tdz +168589 wzmrclw.qbq +dir zfgf +$ cd nzpvt +$ ls +212040 nzpvt +196163 pfr.hpn +$ cd .. +$ cd rhqj +$ ls +36358 frfpn.bwd +$ cd .. +$ cd tdz +$ ls +7924 pfqcbp +$ cd .. +$ cd zfgf +$ ls +190752 nwntvrf.rns +$ cd .. +$ cd .. +$ cd hst +$ ls +327527 bccsm.rqq +90170 nlr +$ cd .. +$ cd pfqcbp +$ ls +163268 fct.qtw +1178 fct.shw +$ cd .. +$ cd .. +$ cd .. +$ cd .. +$ cd .. +$ cd nzpvt +$ ls +256871 bccsm.rqq +219823 pfqcbp +dir swtrnt +146203 tdwv +150052 wfp.lgp +123164 zqmq +$ cd swtrnt +$ ls +dir fct +$ cd fct +$ ls +7540 nzpvt.lbv +133952 tdz.rqf +$ cd .. +$ cd .. +$ cd .. +$ cd srq +$ ls +294836 tdz.rrc +192802 wzmrclw.qbq +$ cd .. +$ cd tdz +$ ls +255394 bccsm.rqq +99901 nlfv.vfj +316469 pbzcjplt.fgf +104809 tjjmtzdc.jcq +$ cd .. +$ cd vjdjl +$ ls +60934 fct.jts +270669 mmj.mqp +dir nlfv +dir nzpvt +70744 qqjmpvh.dzv +dir szrvs +dir wmbbn +$ cd nlfv +$ ls +dir bnjtlh +132341 drcmppfs +dir gmvjtj +dir gzdj +dir hpvrj +49932 sqvz +dir tdz +$ cd bnjtlh +$ ls +dir fct +255578 mftscrq +dir nlfv +76061 nlfv.bqm +$ cd fct +$ ls +269563 wfp.lgp +$ cd .. +$ cd nlfv +$ ls +198725 ghh +$ cd .. +$ cd .. +$ cd gmvjtj +$ ls +18219 fbhj.pjw +41025 mchtc +$ cd .. +$ cd gzdj +$ ls +113277 dnzl +dir fzhwfr +133044 lrlfq.ndr +120088 qcrv.mrs +dir wgvw +$ cd fzhwfr +$ ls +300485 gbcc +71468 nzpvt.ztg +180837 wfp.lgp +$ cd .. +$ cd wgvw +$ ls +123989 drcmppfs +2266 pfqcbp.ccd +$ cd .. +$ cd .. +$ cd hpvrj +$ ls +270481 bccsm.rqq +$ cd .. +$ cd tdz +$ ls +289817 bnp.wfp +$ cd .. +$ cd .. +$ cd nzpvt +$ ls +dir bnt +dir dtsr +dir rhqrs +dir tdz +42376 wfp.lgp +$ cd bnt +$ ls +dir gjdqwnd +112688 nzpvt.bgh +15859 nzpvt.ftj +219526 nzpvt.gnt +dir rwr +dir tfvgnz +dir ztpflr +$ cd gjdqwnd +$ ls +dir ghsbcb +dir gnnnslbh +dir nnnh +$ cd ghsbcb +$ ls +330485 bqnn.wsv +148644 qvnl.rcw +$ cd .. +$ cd gnnnslbh +$ ls +dir fct +dir nnp +dir nzpvt +152038 rlqsp.vsj +118099 srsjsm +dir vdjzwgz +300404 zcjfnthp +$ cd fct +$ ls +249569 hmpwz.ldw +$ cd .. +$ cd nnp +$ ls +232389 nhfhwbv +$ cd .. +$ cd nzpvt +$ ls +328734 phdw +$ cd .. +$ cd vdjzwgz +$ ls +130149 ttjzr.pjw +dir zslhwc +$ cd zslhwc +$ ls +dir lmhbnvzc +$ cd lmhbnvzc +$ ls +316145 pfqcbp.jmd +$ cd .. +$ cd .. +$ cd .. +$ cd .. +$ cd nnnh +$ ls +247235 wfp.lgp +$ cd .. +$ cd .. +$ cd rwr +$ ls +117412 jqncsgtz.srj +$ cd .. +$ cd tfvgnz +$ ls +301735 drcmppfs +$ cd .. +$ cd ztpflr +$ ls +dir pfscczq +$ cd pfscczq +$ ls +258369 mmwrjjg.snm +208621 qrn.bws +$ cd .. +$ cd .. +$ cd .. +$ cd dtsr +$ ls +226917 cdgn +58590 gqmp.bjw +220622 nlr +97205 tdz.lmf +$ cd .. +$ cd rhqrs +$ ls +dir bhrb +$ cd bhrb +$ ls +98744 nzpvt.sgl +$ cd .. +$ cd .. +$ cd tdz +$ ls +253051 cgn.fwb +41573 qrvqml.vsj +$ cd .. +$ cd .. +$ cd szrvs +$ ls +195204 dhdrjswp +299349 drcmppfs +2890 rzrc.bnd +$ cd .. +$ cd wmbbn +$ ls +248063 nzpvt +56979 zpztvv +$ cd .. +$ cd .. +$ cd zmgzph +$ ls +181700 bccsm.rqq +322580 fzf.pdg +189013 gpcrqlc +260640 rwt +$ cd .. +$ cd .. +$ cd .. +$ cd gqbvgbt +$ ls +dir jlh +dir rvdfpd +$ cd jlh +$ ls +47327 bccsm.rqq +dir mlwz +$ cd mlwz +$ ls +252054 tlg.lfd +$ cd .. +$ cd .. +$ cd rvdfpd +$ ls +102223 cdmd.rzl +120439 lnr +$ cd .. +$ cd .. +$ cd hzjzlwv +$ ls +6753 czzvcvgc.qrw +132168 wzmrclw.qbq +$ cd .. +$ cd jcstr +$ ls +224805 cvnfppdv +$ cd .. +$ cd llf +$ ls +dir dzpzvjw +dir gvq +131774 nlfv.llj +$ cd dzpzvjw +$ ls +284397 dfdtpgsz.cdw +dir fct +dir pfqcbp +210819 qvbzr +dir sztbm +$ cd fct +$ ls +242208 nlfv.zmb +183434 pfqcbp +224189 vdfzrvm.jlf +222688 wfp.lgp +291920 wzmrclw.qbq +$ cd .. +$ cd pfqcbp +$ ls +dir pfqcbp +$ cd pfqcbp +$ ls +60445 tdz +$ cd .. +$ cd .. +$ cd sztbm +$ ls +165502 mcqlcmc.rbp +$ cd .. +$ cd .. +$ cd gvq +$ ls +dir dwtj +dir fnmvrslw +dir tdz +dir vndm +$ cd dwtj +$ ls +dir qtrqhh +$ cd qtrqhh +$ ls +115781 tdz.nzv +123358 wfp.lgp +$ cd .. +$ cd .. +$ cd fnmvrslw +$ ls +dir brzzr +29456 fct.fqz +257982 nlfv +$ cd brzzr +$ ls +195396 mlsszsf +309844 nlfv +$ cd .. +$ cd .. +$ cd tdz +$ ls +dir stwrprz +dir zmrm +$ cd stwrprz +$ ls +143929 slfbtj.qtz +$ cd .. +$ cd zmrm +$ ls +128440 nlr +$ cd .. +$ cd .. +$ cd vndm +$ ls +dir dnzlnmzc +dir fct +$ cd dnzlnmzc +$ ls +73389 nvdznjtw.fqp +51123 rcrtl.fwc +$ cd .. +$ cd fct +$ ls +14933 drcmppfs +324404 drm.fmg +$ cd .. +$ cd .. +$ cd .. +$ cd .. +$ cd .. +$ cd nnn +$ ls +dir pfqcbp +dir rlvfd +$ cd pfqcbp +$ ls +285385 lspfqghn.ccl +90876 nlr +$ cd .. +$ cd rlvfd +$ ls +198026 wpzg +$ cd .. +$ cd .. +$ cd qsdv +$ ls +32915 fct.psc +86919 qfzsfz +$ cd .. +$ cd tdl +$ ls +320007 tdbpggtw +$ cd .. +$ cd tmcpgtz +$ ls +dir brbn +dir brt +101599 hdtg.bbb +dir jhz +dir rbdbtd +dir tdz +dir trflnpmw +dir wldfm +$ cd brbn +$ ls +dir hfdlq +145067 wfp.lgp +$ cd hfdlq +$ ls +43395 htshjzd +$ cd .. +$ cd .. +$ cd brt +$ ls +82871 drcmppfs +dir fct +dir qnghcq +dir tgmrlh +$ cd fct +$ ls +199814 wzmrclw.qbq +$ cd .. +$ cd qnghcq +$ ls +143210 mrqll +162526 nlfv.bbs +$ cd .. +$ cd tgmrlh +$ ls +48165 bccsm.rqq +318013 pfqcbp +$ cd .. +$ cd .. +$ cd jhz +$ ls +dir cqqlhrgf +244294 ftwmblf +334112 gvm.lsw +dir jjtjrsm +dir nhjztw +dir wdqmdszj +238850 wzmrclw.qbq +$ cd cqqlhrgf +$ ls +54323 fct.zrn +dir gslvzq +89225 nzpvt.jwn +170612 vnszlrms.qmm +124897 zcddc +158922 zdzr +$ cd gslvzq +$ ls +132083 nlfv +$ cd .. +$ cd .. +$ cd jjtjrsm +$ ls +66475 vqlqwvd +$ cd .. +$ cd nhjztw +$ ls +128488 bccsm.rqq +319667 nlfv.nql +106856 pfqcbp +$ cd .. +$ cd wdqmdszj +$ ls +224155 zsntbsns.svg +$ cd .. +$ cd .. +$ cd rbdbtd +$ ls +214776 pfqcbp.fwz +$ cd .. +$ cd tdz +$ ls +152287 gfmdcrt +dir jsqd +219555 jvstcp.ngl +dir mmgjzmcc +dir nlfv +dir vpwmlq +$ cd jsqd +$ ls +284781 bcsd.dll +dir dttzdnpb +217660 dvpj.qgq +56055 jzslsrq.zsh +dir nzpvt +dir pfqcbp +220497 tdz.mmv +278405 zzhsgr.bqp +$ cd dttzdnpb +$ ls +23222 pfqcbp.mpq +50335 qdmcgbz.jpp +$ cd .. +$ cd nzpvt +$ ls +128962 gwzvqc.bpj +$ cd .. +$ cd pfqcbp +$ ls +260384 pfqcbp.nfp +$ cd .. +$ cd .. +$ cd mmgjzmcc +$ ls +255325 wzmrclw.qbq +$ cd .. +$ cd nlfv +$ ls +dir cfdj +275703 nlr +dir wlzd +$ cd cfdj +$ ls +244185 wfp.lgp +$ cd .. +$ cd wlzd +$ ls +dir vtpjz +$ cd vtpjz +$ ls +140890 wfp.lgp +$ cd .. +$ cd .. +$ cd .. +$ cd vpwmlq +$ ls +dir bmtrdpdl +dir cqvdppcg +212696 fct.pnc +32622 fzvsv.hsr +26043 hwmmr +176780 wqd.hbm +$ cd bmtrdpdl +$ ls +145895 pfqcbp.jtp +220677 pllqlvn +49356 wfp.lgp +$ cd .. +$ cd cqvdppcg +$ ls +276847 jgthh.ssc +$ cd .. +$ cd .. +$ cd .. +$ cd trflnpmw +$ ls +dir gfgn +dir jrlqjsc +dir nlfv +dir phmdq +dir qnvmpzv +311867 tdz +$ cd gfgn +$ ls +255377 bccsm.rqq +317338 pwfq +$ cd .. +$ cd jrlqjsc +$ ls +98803 wzmrclw.qbq +$ cd .. +$ cd nlfv +$ ls +dir fqt +208205 tdfgzdbb.szm +$ cd fqt +$ ls +99816 jcm +11010 nlfv.fsv +215962 nlr +$ cd .. +$ cd .. +$ cd phmdq +$ ls +118845 cmssp.sgc +238930 mdhs.tqd +dir nlfv +277199 qnwb +287223 qpqdrvlf +$ cd nlfv +$ ls +253884 bccsm.rqq +$ cd .. +$ cd .. +$ cd qnvmpzv +$ ls +290671 rlnd.tps +$ cd .. +$ cd .. +$ cd wldfm +$ ls +76173 drcmppfs +dir gbzhcvn +dir hrw +$ cd gbzhcvn +$ ls +18543 nlr +$ cd .. +$ cd hrw +$ ls +260983 wfp.lgp diff --git a/README.md b/README.md index 3b1fe7c..54d76b0 100644 --- a/README.md +++ b/README.md @@ -11,16 +11,18 @@ The directories for each day contain my input file, my code and a README that sh These are the days with to most interesting code so far: 1. **day 4**: *x86-64 assembly* with the help of OpenAI 2. **day 6**: *html+javascript* [check it out here](https://quintern.xyz/advent22/day6.html) +3. **day 7**: *awk+bash* -Also, check out the repositories of my friends who do stuff in go, Visual Basic and php: +Also, check out the repositories of my friends who do stuff in go, Visual Basic, php and many other languages! - [Daniel](https://git.quintern.xyz/TheShinyMelon/AOC_2022) - [Jonas](https://github.com/JonasBordewick/advent_of_code_2022) ## Language - Day -- **awk**: day 1 +- **Awk**: day 1, 7 - **Assembly, x86-64**: day 4 -- **bash**: day 1 +- **Bash**: day 1, 7 - **C**: day 3, 4 - **C++**: day 2 - **Javascript**: day 6 - **Python**: day 5 +- **VIM-Script**: day 3