home.social

#unixshells — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #unixshells, aggregated by home.social.

  1. @cks

    For what it's worth, the actual Bourne shell, in #Illumos, does not have an -l option.

    illumos.org/man/1HAS/sh

    #UnixShells

  2. @cks

    There is something general, but the Bourne Again is one of the #UnixShells exceptions that doesn't support it.

    The Z, Watanabe, Almquist (Debian, FreeBSD, & NetBSD), Korn (various), & Bourne Again shells allow combining -l -and -c.

    Of those, only the Bourne Again and Debian Almquist shells do not include l in the $- variable. Notably, the BSD Almquists do.

    Of the same those, only the Z shell and the Almquists do not include c in $- .

    The Watanabe and the Korns have l and c in $-.

  3. @rl_dane

    The alternative is to make the shell handle the un-escaping:

    echo hello,there |sed 's/,/'"\n"'/g'

    It's undocumented in several ksh flavours, but nonetheless works. However, those flavours also (trying a quick few tests) support the better way, which is also undocumented though:

    echo hello,there |sed $'s/,/\n/g'

    #sed #UnixShells #KornShell #OpenBSD #ksh

  4. @rl_dane

    The alternative is to make the shell handle the un-escaping:

    echo hello,there |sed 's/,/'"\n"'/g'

    It's undocumented in several ksh flavours, but nonetheless works. However, those flavours also (trying a quick few tests) support the better way, which is also undocumented though:

    echo hello,there |sed $'s/,/\n/g'

    #sed #UnixShells #KornShell #OpenBSD #ksh

  5. @rl_dane

    The alternative is to make the shell handle the un-escaping:

    echo hello,there |sed 's/,/'"\n"'/g'

    It's undocumented in several ksh flavours, but nonetheless works. However, those flavours also (trying a quick few tests) support the better way, which is also undocumented though:

    echo hello,there |sed $'s/,/\n/g'

    #sed #UnixShells #KornShell #OpenBSD #ksh

  6. @rl_dane

    The alternative is to make the shell handle the un-escaping:

    echo hello,there |sed 's/,/'"\n"'/g'

    It's undocumented in several ksh flavours, but nonetheless works. However, those flavours also (trying a quick few tests) support the better way, which is also undocumented though:

    echo hello,there |sed $'s/,/\n/g'

    #sed #UnixShells #KornShell #OpenBSD #ksh

  7. @rl_dane

    The alternative is to make the shell handle the un-escaping:

    echo hello,there |sed 's/,/'"\n"'/g'

    It's undocumented in several ksh flavours, but nonetheless works. However, those flavours also (trying a quick few tests) support the better way, which is also undocumented though:

    echo hello,there |sed $'s/,/\n/g'

    #sed #UnixShells #KornShell #OpenBSD #ksh

  8. @josevnz

    Looks complex. (-:

    C shell:

    % printf '%s\n' $path

    Z shell:

    % printf '%q\n' "$path[@]"

    #UnixShells #CShell #ZShell #zsh #csh

  9. @ianthetechie

    I was about to write the same thing.

    And as @steeph pointed out, getopt in shell script does not allow one to do several things, including take advantage of the Z shell's ability to automatically construct command-line completions for anything that supports --help .

    @rl_dane
    #getopt #UnixShells #zsh

  10. I just read about MUSH (Microsoft User Shell) – which is the keyboard-based pre-pulldown menu system that existed in Multiplan, Word or XTree – and early drafts of Microsoft Interface Manager, an text UI precursor of Windows which resembled DOSShell from MS-DOS 4, on the website of @nina_kali_nina . I remembered there actually was a Visual Shell, vsh in Microsoft Xenix (their Unix OS). Sadly, browsing was not very intuitive … #softwarearcheology #unix #unixshells

  11. I just read about MUSH (Microsoft User Shell) – which is the keyboard-based pre-pulldown menu system that existed in Multiplan, Word or XTree – and early drafts of Microsoft Interface Manager, an text UI precursor of Windows which resembled DOSShell from MS-DOS 4, on the website of @nina_kali_nina . I remembered there actually was a Visual Shell, vsh in Microsoft Xenix (their Unix OS). Sadly, browsing was not very intuitive … #softwarearcheology #unix #unixshells

  12. I just read about MUSH (Microsoft User Shell) – which is the keyboard-based pre-pulldown menu system that existed in Multiplan, Word or XTree – and early drafts of Microsoft Interface Manager, an text UI precursor of Windows which resembled DOSShell from MS-DOS 4, on the website of @nina_kali_nina . I remembered there actually was a Visual Shell, vsh in Microsoft Xenix (their Unix OS). Sadly, browsing was not very intuitive … #softwarearcheology #unix #unixshells

  13. I just read about MUSH (Microsoft User Shell) – which is the keyboard-based pre-pulldown menu system that existed in Multiplan, Word or XTree – and early drafts of Microsoft Interface Manager, an text UI precursor of Windows which resembled DOSShell from MS-DOS 4, on the website of @nina_kali_nina . I remembered there actually was a Visual Shell, vsh in Microsoft Xenix (their Unix OS). Sadly, browsing was not very intuitive … #softwarearcheology #unix #unixshells

  14. I just read about MUSH (Microsoft User Shell) – which is the keyboard-based pre-pulldown menu system that existed in Multiplan, Word or XTree – and early drafts of Microsoft Interface Manager, an text UI precursor of Windows which resembled DOSShell from MS-DOS 4, on the website of @nina_kali_nina . I remembered there actually was a Visual Shell, vsh in Microsoft Xenix (their Unix OS). Sadly, browsing was not very intuitive … #softwarearcheology #unix #unixshells

  15. @rqm

    @rl_dane hit the nail on the head.

    This isn't really specific to completion. It's just general overlong input line editing behaviour.

    The PD #KornShell and its derivatives (e.g. the #MirBSD Korn Shell) only have line editing with a single line that sideways scrolls.

    ksh93, however, has a
    set -o multiline
    option for switching to a multiple-line line editing mode. (The Z and Bourne Again shells have similar.)

    You might like the Watanabe shell. It's in ports.

    @magicant
    #UnixShells

  16. @rqm

    @rl_dane hit the nail on the head.

    This isn't really specific to completion. It's just general overlong input line editing behaviour.

    The PD #KornShell and its derivatives (e.g. the #MirBSD Korn Shell) only have line editing with a single line that sideways scrolls.

    ksh93, however, has a
    set -o multiline
    option for switching to a multiple-line line editing mode. (The Z and Bourne Again shells have similar.)

    You might like the Watanabe shell. It's in ports.

    @magicant
    #UnixShells

  17. @rqm

    @rl_dane hit the nail on the head.

    This isn't really specific to completion. It's just general overlong input line editing behaviour.

    The PD #KornShell and its derivatives (e.g. the #MirBSD Korn Shell) only have line editing with a single line that sideways scrolls.

    ksh93, however, has a
    set -o multiline
    option for switching to a multiple-line line editing mode. (The Z and Bourne Again shells have similar.)

    You might like the Watanabe shell. It's in ports.

    @magicant
    #UnixShells

  18. @rqm

    @rl_dane hit the nail on the head.

    This isn't really specific to completion. It's just general overlong input line editing behaviour.

    The PD #KornShell and its derivatives (e.g. the #MirBSD Korn Shell) only have line editing with a single line that sideways scrolls.

    ksh93, however, has a
    set -o multiline
    option for switching to a multiple-line line editing mode. (The Z and Bourne Again shells have similar.)

    You might like the Watanabe shell. It's in ports.

    @magicant
    #UnixShells

  19. @rqm

    @rl_dane hit the nail on the head.

    This isn't really specific to completion. It's just general overlong input line editing behaviour.

    The PD #KornShell and its derivatives (e.g. the #MirBSD Korn Shell) only have line editing with a single line that sideways scrolls.

    ksh93, however, has a
    set -o multiline
    option for switching to a multiple-line line editing mode. (The Z and Bourne Again shells have similar.)

    You might like the Watanabe shell. It's in ports.

    @magicant
    #UnixShells

  20. @rl_dane

    I was curious as to what this meant, so I fired up PD ksh and tried what I thought long command-prompt entries meant.

    The PD #KornShell uses a column width greater than the terminal width (which I set to 50 columns here, just to make things easier) because it SPC-pads everything to the length of the longest string; and ends up double-spacing most rows in the table as a consequence.

    I couldn't figure out how to get it to specifically clip rows, though.

    @rqm
    #UnixShells

  21. @jhx

    If you want another voyage of discovery, try to track down the first shell that monitored the mailbox and printed a new mail notification before printing its prompt.

    #mail #UnixShells #Unix

  22. @lattera

    That's not the Bourne shell.

    That's the Almquist shell, first posted to comp.sources.unix in 1989 as v19i001 to v19i008. #KennethAlmquist was at the University of Washington.

    The Bourne shell was released a decade earlier, and was copyrighted AT&T work.

    No current BSD has the Bourne shell in base, because of the 1980s AT&T copyright problems.

    #FreeBSD and #NetBSD have the Almquist shell as sh and #OpenBSD has one of the Korn shell variants.

    #UnixShells

  23. @xdej @zwol

    It's worth bearing in mind that (a) non-interactive shells used by automatic tools should not really end up running .bashrc/.zshrc, and (b) the aforementioned "nx" attack was targetting systems that had real users's home directories (containing passwords, keys, and whatnot).

    So, strictly, it's not passwordless "sudo" alone. It's passwordless "sudo" appended to .bashrc/.zshrc, running "shutdown".

    stepsecurity.io/blog/supply-ch

    news.ycombinator.com/item?id=4

    @ska

    #UnixShells #npm #nx #sudo

  24. @lfa

    sh could be any of several shells, including ksh and bash; and you've missed the Almquist and Z shells, which are also ones of long standing that people are likely to be using.

    #UnixShells

  25. @scalonnec @BastilleBSD

    Probably because it's a meaningless designation for a poll. The Bourne, Bourne Again, Almquist, Debian Almquist, Thompson, Mashey, and Korn shells have all been sh on various operating systems. One could mean any of those, and more besides (e.g. the Watanabe shell), when writing "sh".

    #UnixShells #Unix #shell