Share this postbash 1-liner to strip comments from AI generated codecodefaster.substack.comCopy linkFacebookEmailNoteOtherbash 1-liner to strip comments from AI generated codeTyler AdamsJan 18, 20242Share this postbash 1-liner to strip comments from AI generated codecodefaster.substack.comCopy linkFacebookEmailNoteOther1Share$ pbp | grep -v "^ *#" | pbcpbp is paste to stdoutgrep -v "^ *#" Filter all lines that have only spaces before a #.CodeFaster is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.Subscribepbcpbc is write stdin to the copy bufferHappy hackingCodeFaster is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.Subscribe
P.S. if you ask AI to do this, it uses an overlyfancy sed script and files instead of paste buffers! https://chat.openai.com/share/6e80e1e4-e5e2-4239-babf-707d6f986c30