[ home / overboard ] [ soy / qa / mtv / dem ] [ int / pol ] [ a / asp / biz / fit / k / r9k / sude / tech / tv / v / x ] [ q / news / chive / rules / pass / bans ] [ wiki / booru / irc ]

A banner for soyjak.party

/sci/ - Soyence and Technology

I fucking love science!
Catalog
Email
Subject
Comment
File
Password (For file deletion.)

File: ClipboardImage.png πŸ“₯︎ (50.62 KB, 795x499) ImgOps

 β„–25976[Quote]

Another NT Victory: Powershell

 β„–25983[Quote]

brevity is the soul of wit

 β„–26069[Quote]

>windows cmd trying to be a posix shell (and failing) is a "win"

 β„–26072[Quote]

>>26069
PS is not POSIX. POSIX is malware.

 β„–26073[Quote]

>>26072
> POSIX is malware
then why does windows have a posix layer

 β„–26074[Quote]

>>26073
past tense had

 β„–26077[Quote]

>i transheart having to type a leftist meme every time i want to do something on my toy OS

 β„–26085[Quote]

>>26077
UNIXbrains will see:

ls -F $sitedir/./$req_paths_list >[2]/dev/null \
| {
sed $dirfilter'/\/[^_.\/][^\/]*(\.(md|txt|html)|\/)$/!d; s!^'$sitedir'!!; '$dirclean
if(! ~ $#synth_paths 0) echo $synth_paths | tr ' ' $NEW_LINE
} | sort -u | awk -F/ '
function p(x, y, s) { for(i=0; i < x-y; i+=1) print s }
BEGIN { lNF=2; print "<ul>" }
{
d = ""
if(match($0, "/$"))
d = "/"
sub("/$", "") # Strip trailing / for dirs so NF is consistent

p(NF, lNF, "<li><ul>")
p(lNF, NF, "</ul></li>")
lNF = NF

bname = $NF d
path = $0 d
gsub(/[\-_]/, " ", bname)

# To avoid false matches add trailing / even for plain files to act as delimiter
pa = path
gsub(/[^\/]$/, "&/", pa)

if(index(ENVIRON["req_path"] "/", pa) == 1)
print "<li><a href=\"" path "\" class=\"thisPage\">&raquo;<i> " bname "</i></a></li>"
else
print "<li><a href=\"" path "\">&rsaquo; " bname "</a></li>"
}
END { p(lNF, 2, "</ul></li>"); print "</ul>" }'

And think that it is easy to understand and sane (this is a single command)

 β„–26086[Quote]

>>26085
You've been filtered

 β„–26093[Quote]

>>26086
Explain what ls -F $sitedir/./$req_paths_list >[2]/dev/null \ | { sed $dirfilter'/\/[^_.\/][^\/]*(\.(md|txt|html)|\/)$/!d; s!^'$sitedir'!!; '$dirclean if(! ~ $#synth_paths 0) echo $synth_paths | tr ' ' $NEW_LINE } | sort -u | awk -F/ ' does

 β„–26099[Quote]

>>26093
The awk bit at the end of the pipeline obviously runs the script below with / as delimiter.
The rest is a bit more unclear due the lacking variable context. It to filters txt, md and html files from the ls output and ignores all such files with a dot or underscore at the beginning, while stripping $sitedir from the path of each file.

 β„–26238[Quote]

>>26085
absolutely filtered

 β„–26241[Quote]

File: ClipboardImage.png πŸ“₯︎ (23 KB, 255x75) ImgOps


 β„–26244[Quote]

File: immunity_doggo.jpg πŸ“₯︎ (218.71 KB, 500x860) ImgOps


 β„–26245[Quote]

File: ClipboardImage.png πŸ“₯︎ (25.11 KB, 255x75) ImgOps

d

 β„–26256[Quote]

>>25976
Powershell sucks you're a braindead nigger if you think Powershell is good

 β„–26272[Quote]

>>25976
literally anything can do this
even a fucking smart microwave

 β„–26327[Quote]

>this thing not part of NT kernel…

 β„–26352[Quote]

>>26327
NT isn’t just a kernel.



[Return][Catalog][Go to top][Post a Reply]
Delete Post [ ]
[ home / overboard ] [ soy / qa / mtv / dem ] [ int / pol ] [ a / asp / biz / fit / k / r9k / sude / tech / tv / v / x ] [ q / news / chive / rules / pass / bans ] [ wiki / booru / irc ]