shell

  1. L

    Shell How to Send a Text to Arduino

    Hello friends I've done this before on Linux but apparently I have to do something else on FreeBSD and I couldn't find any articles on the internet and our friends at Matrix couldn't help me. I have connected an arduino to the LCD and I want my FreeBSD IP to be displayed on the LCD. i really...
  2. Myersj281

    Solved CSH prompt customization

    As this question is regarding a package in the base system, this seemed like the best place to ask. If not, just recomend a new place to ask and I'll move it there. I'm attempting to migrate from ZSH to CSH and the configuration is proving to be a bit difficult. In ZSH, I have these lines...
  3. dnb

    Your favorite shell in FreeBSD

    Tell about your favorite FreeBSD shell. What opportunities are you most interested in? How many lines does your shell configuration take? This question is because I saw monstrously complex .shrc in someone's dotfiles on github. Does anyone use csh in FreeBSD 14 for a non-privileged user or even...
  4. K

    C Modifications on [T]csh

    I've introduced some modifications on [T]csh. Functions (only for scripts) Read files into a variable Comments on interactive sessions Tell whether stdin is empty I'd appreciate for any feedback, suggestion or contribution. Contributions of any kind are very welcome. A key [T]csh developer...
  5. D-FENS

    Solved How to set environment variables inside a "jexec" call?

    I would like to call a command inside a jail using jexec while setting environment variables for that particular call. In a shell inside the jail I would call: KEYCLOAK_ADMIN=admin KEYCLOAK_ADMIN_PASSWORD=admin ./kc.sh show-config How can I trigger this call outside of the jail? I tried...
  6. gotnull

    Solved How to print a variable on STDOUT while still have the hand

    Hello, Is it possible to display a variable on STDOUT and keep the hand in order to use/edit it ? I've tried to remove the carriage return or newline with tr , or changing IFS but that didn't work. So after few hours on this I just wonder if it is possible, if yes what command/tool can do...
  7. gotnull

    Solved Which port for kornshell?

    Hello, What would be the port you would recommend to someone who wants to try Kornshell? I thought it would be wise to ask directly to those who have already installed some of the ports in the repository since there are many of them: ast-ksh-20141224_1................KornShell 93...
  8. K

    Other Git "server" via SSH

    Hello all, With Git, you basically have 3 choices for a server: Git protocol (similar to svnserve but with no authentication or encryption) HTTP(s)/CGI/smart/dumb/webdav SSH Personally I am not entirely happy with any of them (Git protocol has no authentication, HTTP(s) needs central...
  9. BaronBS

    ELI5: Guys, I have a few questions about programming and FreeBSD

    1- What would be the best way to learn posix with focus on BSD's, shell and Perl? 2- Is there another language for sysadmins besides shell and Perl? 3- What is the best way to navigate the FreeBSD source code? 4- What are the languages most used in FreeBSD development? PS.: I'm not a developer...
  10. I

    Solved Weird behaviour with piping STDOUT to /dev/null

    Hello, I'm experimenting with data filtering use some of console programs and found weird behaviour with piping STDOUT of GNU grep to /dev/null. File test is 10Gb of data (apache log). $ /usr/bin/time -h ggrep 'GET' test > /dev/null 0,00s real 0,00s user 0,00s sys It seems...
  11. Sergei_Shablovsky

    Shell cron script/utility to make screenshots and periodically emailing

    HI, FreeBSD Gurus ! Please suggest me tool/sys utility/script that : - constantly running in a background under root privilege; - saving local-attached terminal (monitor on server's VGA output, no any GUI used) screenshot to destination folder; - periodically (hourly or daily, or certain day of...
  12. rwv37

    Any reasons anymore to NOT change the default root shell to one that's not built-in?

    I know that for a long time, the standard advice for the default root shell was "don't change it" (which I learned many years ago when I got myself into a mess after having changed it 😛). Is that still the case? I seem to remember that the issue was that if you changed it to, say...
  13. A

    How to prevent service/system output while working in interactive shell.

    Hello, is there any way to prevent the system from printing to vt? It's quite annoying when I edit files in vi or ed and the system suddenly tells me that a USB device has disconnected, overwriting the interactive shell. The same goes for services like samba_service. Can anyone tell me how to...
  14. byrnejb

    Shell bash - validate input date

    This has to have a simple answer somewhere but cannot seem to find it for FreeBSD specifically. Given this input: DT='2022.02.30' I want to determine that this date is invalid. I first turned to the date utility: echo $DT ; date -j -f '%Y.%m.%d' $DT ; echo $? 2022.02.30 Wed Mar 2 15:56:22...
  15. T

    Solved selectively remove arguments from shell script

    I have been writing a bunch of shell scripts that essentially wrap existing commands so I don't need to remember the intricate details for most of what I want to do. I have a shell script that essentially builds parameters to call another executable. Some of the arguments should not be...
  16. blind0ne

    Shell set the root for script to run another scripts outside

    Hello, Please, give me an advice, how to set the / for my script, to it accidentally no to "bound out" the borders of my "program" that consist of a lot of a sh scripts. Should I choose the "chroot" for this? Peace
  17. blind0ne

    Shell General Commands Manual

    Hello, I've entered man read from sh shell and saw pushd and popd inside but there is no such builtin in sh, it's bash' builtin, Which command should I use for referencing sh builtins?
  18. blind0ne

    Shell Trying to learn shell scripts (create own service to run on boot)

    Hello, I'm trying to understand the process of starting scripts and understand shell itself. I would like to ask: what is $rc_fast_and_loose? in if [ -n "$rc_fast_and_loose" ]; then set $_arg; . $_file what is -n here? is it True if the length of "STRING" is non-zero. ? and what...
  19. I

    How to limit search result of directories/files to limited top-level directories only?

    I did a find / -name 'XXX' and the output is insane. It lists every file and the list never ends (I had to Ctrl-C to stop it). How can I view the results meaningfully? For example, I'd like to limit to the result to appear only for, say the top-level (or top 2nd or 3rd level) directories only...
  20. I

    rc.d shell scripts: no extension vs. .sh

    I think I asked this question sometime ago, but I can't find the answer when searching for it. Anyway... First, I think I know the difference for startup shell scripts located in /etc/rc.d and /usr/local/etc/rc.d. The former is for system scripts while the latter is for user-installed scripts...
Back
Top