Admittedly I am running a fairly old version of FreeBSD on this machine but Lua doesn't seem to be on here.
When in doubt about any JS coding problem, I get in no time an answer to my question in any search engine.
#!/usr/bin/env ocamlrun
Can't tell if trolling or if you would consider a compiled language for shell scripting? Either way I would be horrified if "add event handler" returns a C++ result. That is a "web page" thing.your favorite language C++ isn’t even mentioned on the first page
if [ -e "/some/path" ]; then
echo "yay"
fi
Going off-topic (again first shell/regex!), but if you're going to develop on .Net platform, it's better to stick to C#. On Java, beside arguments on JSP and JVM, I have a feeling that it going completely replaced by PWA. Not now of course, but it's coming. Investment on Java for newcomers!? I don't do that.If anything it is part of the base install, unlike Java or VisualBasic.Net (or its clones like Microsoft #cSharp)
Are you categorically reject using boost or that was just an search example? I don't use boost, I'm just curious.with C++ I also have to add "-boost" to my queries too
CSharp and VB.NET is basically the same thing (literally, the compilers share the same codebase). The name C# was a marketing ploy by Microsoft (similar to JavaScript) to cash in on the success of C++ and make casual developers feel part of the club. Perhaps consider C++/clr:safe instead. It is a .NET compiler which integrates better with professional middleware (i.e most actual software is written in native C or C++). It also provides a better upgrade path to C++/cx when Microsoft drops .NET entirely.if you're going to develop on .Net platform, it's better to stick to C#
Yep, Boost rots too much. Software lifespan is more important to me than gimmicks.Are you categorically reject using boost or that was just an search example? I don't use boost, I'm just curious.
if you shell grow up, write C tools.
but maybe someone can find it or an another that explain shell in the same mindeset of it was designed.
I guess it's coming with version 13Did you mean sh and awk? Admittedly I am running a fairly old version of FreeBSD on this machine but Lua doesn't seem to be on here.
I must revisit my advocate for the traditional RC init of FreeBSD when I actually read one of them: ldconfig. I found like I'm lost in a forest. They used many variables like ldconfig_local_dirs, ldconfig_paths,... but no way I saw they defined these variable. I wanted to modify it to work with my FreeBSD distro where I replaced the FreeBSD Ports system with Ravenports, pkgng with ravensw (doing so my /usr/local is not available at all, as raven uses /raven, not /usr/local). Finally I have to give up because I have no idea how to patch it to work with my configuration.Let's face it. There is a grain of truth in the OP's statements. The Shell Scripting Language is merely a catastrophe. It is the defacto substandard of coding and flawed beyond belief. We all use it with more or less success, but do we really like it?
I like JavaScript. When in doubt about any JS coding problem, I get in no time an answer to my question in any search engine. When in doubt about SH coding I get tons of non-answers for non-problems in BASH - eventually, somehow I find a solution, however it is almost never an easy going.
For example SH doesn't even care about operator precedence. I am almost sure, that the people who invented SH never heard about commutative and non-commutative operations, did they?
where I replaced the FreeBSD Ports system with Ravenports, pkgng with ravensw (doing so my /usr/local is not available at all, as raven uses /raven, not /usr/local).
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/site/lib:/usr/pkgsrc/lib
I was agree that shell script is horrible...I was like every one, my shell script never had function and I wrote a lot of «if» statement.
But now, after learning the principle behind shell, I use a lot of function and «if» are very rare on my script...
#!/usr/bin/awk -f
# Set the field separator to ":". Default is whitespace
BEGIN { FS=":" }
# Skip comment lines
/^#/ { next }
# Capture root's shell
$1 ~ /root/ { rootShell=$7 }
# Keep shell usage counts
$7 != "" { shells[$7]++ }
$7 == "" { shells["No shell"]++ }
# Print results
END {
print "Root's shell is", rootShell;
for( i in shells ) {
print i, shells[i];
}
}
% ./shells.awk /etc/passwd
Root's shell is /bin/csh
No shell 1
/usr/local/libexec/uucp/uucico 1
/bin/csh 2
/usr/sbin/nologin 33
Thanks, hard to find with only my phone.
Why you think Thinbasic is read flag? What's wrong with your reading? Thinbasic in Windows-only product. How the hell I could port it to Unix? I'm not have the skills needed to make a Unix clone of it too.shell to FreeBSD is like PowerShell to Windows. That thinBasic thing is red flag. OP said porting. Python, Lua, TCL, etc are fine. but OP needs to learn sh.
Handbook --> Porter's Handbook --> I need to learn sh! --> Learning sh --> I need to learn basic tools (regex, sed, grep, etc) --> Learning them --> back to learning sh --> back to Porter's Handbook.
Then now you stopped advocating for Ada but switched to OCaml? BTW, thank youSh is perfectly fine for small things, complex things can easily come close to be un-maintainable (and unreliable if not done with extra care), see the ports system. If we have managed already to get proper OCaml support on FreeBSD I would recommend it: easy to learn, rigorously documented, sanely developed, super fast, hand-way security, very flexible, and can also run as interpreted language (making it easy to convert to a compiled version if necessary).
#!/usr/bin/env ocamlrun
I know this. But this is hacky. Shouldn't be used for a proper distro like what I used to be trying to do. The proper way is the ldconfig service that you saw printed a bunch of lines when the system startup. But as you said you used old FreeBSD versions, I think you would not know it since it's a later addition of newer versions (at least I think so).I do something similar (I have /usr/local, /usr/site, /usr/pkgsrc). I was a big fan of the Solaris 10 way of doing things basically
Just remember you can set LD_LIBRARY_PATH. I.e
Code:export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/site/lib:/usr/pkgsrc/lib
Just set it in your ~/.profile
I think the reality is if you're going to stick with FreeBSD you'll need to learn shell scripting. It will just make things easier. It will also allow you to understand the thousands of scripts out there to help with day to day activities. It's not a waste of time, IMO.Why you think Thinbasic is read flag? What's wrong with your reading? Thinbasic in Windows-only product. How the hell I could port it to Unix? I'm not have the skills needed to make a Unix clone of it too.
Offtopic on: Thinbasic is a scripting language, not compiled language like other variants of basic.I think the reality is if you're going to stick with FreeBSD you'll need to learn shell scripting. It will just make things easier. It will also allow you to understand the thousands of scripts out there to help with day to day activities. It's not a waste of time, IMO.
I am not sure where this Thinbasic comes into the discussion. I know you raised it in your original message but I didn't/don't understand its relevance to your issue.
Is it not a langauge like cbasic, truebasic, realbasic, visualbasic etc? It's not a scripting language, per se, is it?