News for hackers. Stuff that matters.
Re:GNU/Linux shell related internals by usr1106 on Sunday December 18, 2022 @08:18AM (#34037398)
The headline seems weird. The list of file descriptors etc etc does not sound like shell internals, hut like Unix operating system concepts.
Re:GNU/Linux shell related internals by ytch on Sunday December 18, 2022 @08:35AM (#34037495)
It more likes "How shell invokes a command", I have a POSIX programming course in university, one homework is to implement a simple shell, you need to handle the FDs, Pipes, environment variables by POSIX API as the article explains.
Re:GNU/Linux shell related internals by supriyo-biswas on Sunday December 18, 2022 @08:27AM (#34037446)
If you're after how the shell parses commands, the EBNF grammar in the POSIX specification is a good start:

https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V...

Unfortunately, there's not much to a shell other than it's parsing capabilities.

Re:GNU/Linux shell related internals by chasil on Sunday December 18, 2022 @10:19AM (#34038473)
It is unfortunate that an LR-parsed language was chosen.

https://archive.fosdem.org/2018/schedule/event/code_parsing_...

Re:GNU/Linux shell related internals by dottedmag on Sunday December 18, 2022 @08:58AM (#34037662)
Shell internals and Unix internals are pretty intertwined. Amount of ancient syscalls and ioctls that exist directly to support shells is quite large.
Re:GNU/Linux shell related internals by dizhn on Sunday December 18, 2022 @08:41AM (#34037531)
It was fun to do what the cookie banner says and leave without reading.
Re:GNU/Linux shell related internals by lucideer on Sunday December 18, 2022 @10:03AM (#34038317)
Worth mentioning leaving immediately without reading won't prevent them tracking you (they've presumably already done that before you started reading the banner).

Which is why such banners are generally* not considered compliant with most privacy regulations & are largely put in place out of ignorance/general misinformation around what regulations require.

* Depending on what the cookies are doing it's entirely possible this website might not need to get any consent or even inform users at all - the banner does nothing for them either way.

Re:GNU/Linux shell related internals by sjmulder on Sunday December 18, 2022 @10:03AM (#34038320)
A cookie bar with all the annoyance with none of the compliance. What's the point.
Re:GNU/Linux shell related internals by shrimp_emoji on Sunday December 18, 2022 @10:24AM (#34038528)
It's an illegal implementation of GDPR meant to act as compliance theater while at the same time making users resent the law as much as the sites do.

For bigger sites like YouTube which can't get away with it as much, there's a "Reject All" button that you can click straight away.

Re:GNU/Linux shell related internals by 1vuio0pswjnm7 on Sunday December 18, 2022 @09:29PM (#34047592)
At least three options to retrieve this without without Javascript or cookies and view in a popular browser. Example script below. Tested with p7zip and Info-Zip unzip. BSD libarchive unzip should work, too.

NB. This cookie banner annoyance does not work in text-only browser such as links. It only works when using popular browsers.

Uncomment one of the OPTIONS. Then, assuming script is "1.sh",

    sh 1.sh > 1.htm
    firefox ./1.htm

 
    #!/bin/sh
 
    #OPTION1=biriukov.dev
    #OPTION2=raw.githubusercontent.com
    #OPTION3=codeload.github.com
    
    REPO=brk0v.github.io
    
    if test $OPTION3
    then
    curl -A "" -o$REPO-master.zip https://$OPTION3/brk0v/$REPO/zip/master
    fi
    for x in \
    0-sre-should-know-about-gnu-linux-shell-related-internals-file-descriptors-pipes-terminals-user-sessions-process-groups-and-daemons \
    1-file-descriptor-and-open-file-description \
    2-pipes \
    3-process-groups-jobs-and-sessions \
    4-terminals-and-pseudoterminals
    do
    if test $OPTION2
    then
    echo url=https://$OPTION2/brk0v/$REPO/master/docs/fd-pipe-session-terminal/$x/index.html 
    elif test $OPTION1
    then
    echo url=https://$OPTION1/docs/fd-pipe-session-terminal/$x/ 
    elif test $OPTION3 
    then
    #7z x -so $REPO-master.zip $REPO-master/docs/fd-pipe-session-terminal/$x/index.html
    /usr/sbin/unzip -p $REPO-master.zip $REPO-master/docs/fd-pipe-session-terminal/$x/index.html
    fi
    done|if test $OPTION1 
    then
    curl -A "" -K-
    elif test $OPTION2
    then
    curl -A "" -K-
    elif test $OPTION3
    then 
    cat
    rm $REPO-master.zip
    fi|sed 's/<script/<!--&/g;s/<\/script>/&-->/g;s/cookie.css//g;s/cookie.js//g'
Re:GNU/Linux shell related internals by photochemsyn on Sunday December 18, 2022 @10:48AM (#34038762)
I really like this website design. Everything's visible running NoScript in Firefox with Privacy Badger (blocks one tracker) enabled, because it's all HTML/CSS. Whatever jsdelvir.net is doing, it's not needed and blocking it doesn't do what happens on many other sites, i.e. no content at all.

Very educational content as well, the section on how pseudoterminals can be used to build terminal emulators was good, and on how ssh creates a remote terminal connection.

Re:GNU/Linux shell related internals by easrng on Sunday December 18, 2022 @01:39PM (#34041040)
jsdelivr is a free CDN for NPM packages and also github repos. the site is loading an icon font ([email protected]) from it. it's pretty nice as far as free npm cdns go, i guess. they even add SRI hashes to the script tags and stuff they generate by default so they can't swap out the files to malicious versions later.
Re:GNU/Linux shell related internals by fyresala on Sunday December 18, 2022 @10:52AM (#34038801)
I recommend reading TLPI[1] if anyone is willing to jump into the rabbit hole of shell. bash covers a lot of aspects of unix.

[1] https://man7.org/tlpi/