#tcsh — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #tcsh, aggregated by home.social.
-
A fix for single user mode with csh/tcsh would be nice:
-
So, after I met problems with iwlwifi driver and my attempts to aggregate both em0 and wlan0 interfaces to the one lagg0 interface (https://mastodon.bsd.cafe/@evgandr/115985853500057386) — looks like I found a much (MUCH!) simpler solution :drgn_happy:
I wanted to automatically switch between wired and wireless networks when I plug-in (or disconnect) my Ethernet cable. First, because I was a newbie in the FreeBSD world, I tried to search for some kind of NetworkManager. Thankfully, I didn't find any NetworkManager clone ported to the FreeBSD. I found some tries to port NetworkManager from Linux to FreeBSD but all of them are failed (not surprised, lol).
Then, I finally started to read documentation :drgn_think_science: . In the section about advanced networking I read about aggregation interfaces. And somehow I managed to aggregate both of em0 and wlan0 to the one lagg0 interface and it works well.
But, looks like (see https://mstdn.social/@erikarn/115986265106931691) it is not the way how the lagg interfaces should work. It is not intended to use wireless interfaces in the aggregate interfaces — so my tricky setup stopped working in the FreeBSD 15.0.
BUT, since we have a beautiful devd daemon, which listens for various system events and able to execute actions when event is happened — I just wrote 23 lines of shell script to learn my laptop how to switch between interfaces when the Ethernet cable (dis)connects, lol. Solution is very simple:
First, we already have /etc/devd/dhclient.conf, which starts dhclient when some interface appeared in the system. I modified it, so it calls the sPeCiAL script, each time when em0, or wlan0, or ue0 interface appeared in the system, or when em0 is disappeared:
notify 0 {
match "system" "IFNET";
match "type" "LINK_UP";
media-type "ethernet";
action "/root/bin/unfuck_network.tcsh $subsystem ifup";
};notify 0 {
match "system" "IFNET";
match "type" "LINK_DOWN";
media-type "ethernet";
action "/root/bin/unfuck_network.tcsh $subsystem ifdown";
};notify 0 {
match "system" "IFNET";
match "type" "LINK_UP";
media-type "802.11";
action "/root/bin/unfuck_network.tcsh $subsystem";
};notify 0 {
match "system" "ETHERNET";
match "type" "IFATTACH";
match "subsystem" "ue0";
action "/root/bin/unfuck_network.tcsh ue0";
};Then, the main magic happens in the /root/bin/unfuck_network.tcsh:
— When Ethernet cable is connected — it destroys the wlan0 interface and starts dhclient for em0 to talk with DHCP server.
— When Ethernet cable is disconnected — it makes all to remove route using em0 from routing table (removes em0 interface completely, flush routing table, etc — somehow em0 still stays in the routing table if interface is not destroyed; btw system will create it anyway later, in some point) and recreates the wlan0 interface.
— When wlan0 device is created — it starts dhclient for it.Script contents (for tcsh):
#!/bin/tcshswitch ( $1 )
case "em0":
if ( $2 == "ifup" ) then
service netif quietstop wlan0
service dhclient quietstart em0
else if ( $2 == "ifdown" ) then
service dhclient quietstop em0
ifconfig em0 delete
route flush
service routing restart
service netif quietstart wlan0
endif
breaksw;
case "wlan0":
service dhclient quietstart wlan0
breaksw;
case "ue0":
service dhclient quietstart ue0
breaksw;
endsw -
Preparing an engineering-focused presentation entitled "The Zen of Shell Scripting" for an internal talk at work. Question for seasoned Shell programmers: What would you have liked to know when you first started out? Interested in both big ideas and sharp edges that come with Shell scripting.
-
If I've never seen the codebase, which #Linux shell has the easiest code to read and understand? Specifically I want to isolate the code for *parsing* the command line syntax.
All #POSIX-compliant (or close enough) shells welcome! I probably don't know them all but off the top of my head:
#bash
#dash
#fish (sorry for the spam, marine life enthusiasts)
#zsh
#ksh
#tcsh & #csh I think? -
#Poll: Curious about people's attitudes towards shell scripting.
Two part question:
- Are you a DEVeloper (or working in a development-heavy role), OTHER-IT worker (such as a sysadmin, architect, anything in a non-development-heavy role), or NON-IT (accountant, doctor, whatever)
- Do you HATE shell scripting, are you INDIFferent towards (or ignorant of) shell scripting, or do you LOVE it?
#Unix #UnixShell #ShellScript #ShellScripting #POSIX #PosixShell #sh #bash #zsh #csh #tcsh #ksh #pdksh #oksh #mksh
-
Linus Torvalds has proper motivated reasons for really disliking file systems without a case sensitivity.
Read this with me from the kernel lkml, regarding bcachefs.
Re: [GIT PULL] bcachefs fixes for 6.15-rc4 - Linus Torvalds
https://lore.kernel.org/lkml/CAHk-=wja[email protected]/🖋️ #bash #sh #zsh #ksh #csh #tcsh #fish #git #Linux #lkml #POSIX #FOSS #100daysofCode #640DaysOfCode #coding #1024DaysOfCode #github #programming #Torvalds #filesystem
-
Linus Torvalds has coded git two decades ago.
Learn about why how who and where here
https://youtu.be/sCr_gb8rdEI?si=s8tDVh1e8dBTGWkJ
🖋️ #bash #sh #zsh #ksh #csh #tcsh #fish #git #Linux #POSIX #FOSS #100daysofCode #640DaysOfCode #coding #1024DaysOfCode #github #programming
-
This error in MX Linux KDE edition is now annoying
I cant work without ffmpeg and Im NOT going to install a programming ENV: just to build one programma
>>
$ sudo apt install ffmpeg
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Suggested packages:
ffmpeg-doc
The following NEW packages will be installed:
ffmpeg
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
Need to get 1,816 kB of archives.
After this operation, 2,437 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian bookworm/main amd64 ffmpeg amd64 7:5.1.6-0+deb12u1 [1,816 kB]
Fetched 1,816 kB in 2s (992 kB/s)
Selecting previously unselected package ffmpeg.
(Reading database ... 342056 files and directories currently installed.)
Preparing to unpack .../ffmpeg_7%3a5.1.6-0+deb12u1_amd64.deb ...
Unpacking ffmpeg (7:5.1.6-0+deb12u1) ...
Setting up ffmpeg (7:5.1.6-0+deb12u1) ...
Processing triggers for man-db (2.11.2-2) ...
metalloid@bugrupola:~
$ ffmpeg
ffmpeg: error while loading shared libraries: libavcodec.so.59: cannot open shared object file: No such file or directory<<
Who knows a fix apart from compilation?
#AskFediverse #ffmpeg #programming #Linux #KDE #MXLinux #iso #bash #tcsh #ksh #zsh #sh
-
@fbfortune @BRicker I thought #csh (and by extension, #tcsh) was Considered Harmful. https://harmful.cat-v.org/software/csh
-
Tired of asking a web LLM to generate aws-cli commands for you and copy+pasting the result into your shell?
I've written a shell command that does this for me, and I can't live without it now.
Ready for feedback and issues from early adopters.
-
🐚 TCSH, a shell for Fortune & Glory 🐚
Relevant blog post @ OpenSource.com
> "Why I still love tcsh after all these years. Bash may be more popular, but tcsh has advantages that make it more appealing..."
- https://opensource.com/article/20/8/tcsh
How about dot-files for my tcsh config, sure...
- https://codeberg.org/winterschon/dot-files/src/branch/main/.tcshrc#freebsd #linux #sysadmin #engineering #terminal #shells #bash #tcsh #csh #modernSolutionsForModernProblems
-
@kenshirriff @b0rk Always default to enclosing file names and other argument strings to your #shell in 'single quotes' unless you want it mucked about with substituting $ENVIRONMENT_VARIABLES or `command substitution` (which uses an entirely other kind of quote!)
"Double quotes" will honor the spaces but also tell your shell to look for variable and command expansion.
#Linux #Unix #bash #zsh #Zshell #ksh #csh #tcsh #fish #FishShell
-
This guide shows you how to change your Linux shell, making the switch from(to) Bash, Fish, Zsh, or any other shell a breeze.
https://linuxiac.com/how-to-change-shell-in-linux/ -
@ojs @OpenBSDAms A C-Shell is a traditional default shell in #BSD systems (#FreeBSD uses the #tcsh implementation). So, finding at least a default configuration isn't too surprising.