POSIX shell is the worst language ever invented, that is still in widespread use.
Its dialect bash is even worse.
Prove me wrong.
Tip Your Landlord Shirt $21.68 |
UFOs Are A Psyop Shirt $21.68 |
Tip Your Landlord Shirt $21.68 |
POSIX shell is the worst language ever invented, that is still in widespread use.
Its dialect bash is even worse.
Prove me wrong.
Tip Your Landlord Shirt $21.68 |
UFOs Are A Psyop Shirt $21.68 |
Tip Your Landlord Shirt $21.68 |
its only purpose is to call commands and at most do a few basic things on a whim
stop writing elaborate scripts with that
>stop writing elaborate scripts with that
Picrel. It's fast to prototype and test, it's globally accepted, it's understood by everyone. It's interoperable with other sysyems and doesen't require any setup
>It's fast to prototype and test, it's globally accepted, it's understood by everyone. It's interoperable with other sysyems and doesen't require any setup
If you've actually seen any shell scripts, you would know that is false. More of your code is about working around bugs in shells than doing what your script is supposed to do.
timesink less capable than what we had before
down people's throats by corporate interests
>>only liked by shills and the mentally ill
That perfectly describes C and Unix including its shells.
# Unset variables that we do not need and which cause bugs (e.g. in
# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
# suppresses any "Segmentation fault" message there. '((' could
# trigger a bug in pdksh 5.2.14.
for as_var in BASH_ENV ENV MAIL MAILPATH
do eval test x${$as_var+set} = xset
&& ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
done
PS1='$ '
PS2='> '
PS4='+ '
# NLS nuisances.
LC_ALL=C
export LC_ALL
LANGUAGE=C
export LANGUAGE
# CDPATH.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
if test "x$CONFIG_SHELL" = x; then
as_bourne_compatible="if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
emulate sh
NULLCMD=:
# Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
else
case `(set -o) 2>/dev/null` in #(
*posix*) :
set -o posix ;; #(
*) :
;;
esac
fi
There are exactly zero lines of C in your post.
>There are exactly zero lines of C in your post.
>LANGUAGE=C
I see where you're confused but Unix shell uses "C" to mean the standard C locale, not the C programming language. It's part of a shell script.
>That perfectly describes C and Unix including its shells.
It's funny because it's true.
I like it so it can't be that bad.
I agree, this is why I use a good language (Lua) for all my shell scripting stuff
[code=Lua]
ls '/bin' : grep(filter) : wc '-l'
[/code]
How does Lua perform against POSIX? I assume it's much faster than Python.
Lua can be much faster Python or Shell. Luajit proves that it can achieve C speeds for some tasks.
But its standard lib is too minimal and barely covers what standard C (without POSIX) can do. You might be able to write a good library for shell tasks, but that applies to any language.
You can use luaposix for all the posix functions. Luarocks has so many libraies for anything you need
>https://luarocks.org/modules/gvvaughan/luaposix
With LuaJIT its much much much faster. Even base Lua its faster but LuaJIT is amazingly fast
Wow such subtle trolling.
We need the Wayland of bash.
im not trolling, I fricking love lua so much its unreal. I try and write everything in lua
Even though I wrote some Lua code and added Lua bindings to 2 or 3 programs, I'm unfamiliar with the : operator. What does it do? Your example looked made up.
In lua, the `:` operator passes in the table as its first argument, so like this
local my_table = {}
function my_table:some_function()
print(self)
end
my_table:some_function() -- will print table: <some address>
my_table.some_function("hello") -- will print hello
its best matched up with when you are doing OOP
Oh shit, it's the method syntax. I just forgot.
that would be powershell
>giant timesink less capable than what we had before
>forced down people's throats by corporate interests
>only liked by shills and the mentally ill
So does this reimplement the tools, or just call them? It still misses one of two important properties:
>it's all integrated, like you can do "ls -h" or "man ls" to get help without needing anything else
>it can be implemented in any programming language without needing adaptation wrappers
>tranime
>stupid take
Everytime
Right, bash was made by a black man! Refuse bash!
zsh is where its at.
>wget, grep, sed, and bash