1. D

    Shell Share your .zshrc file

    I like the way how tcsh works, but it is outdated a little bit (only 1 update since 2012), also some nice features are available in zsh, like suggesting flags and other completions for cli and not only cli apps… But some of its features are distracting and annoying IMHO. I didn't find any...
  2. A

    Solved Script not running from Cron

    Hello, I have that sh script: #!/bin/sh DATE=`date +%Y-%m-%d:%H:%M:%S` NAME="game" if ps ax | grep -v grep | grep $NAME > /dev/null then echo "$NAME service running, everything is fine" else echo "$DATE: Restarting $NAME" >> /root/log cd /usr/home/game/db && ./game fi and it works...
  3. JazzSinatra

    TTY, Shell, prompt, terminal?

    This is probably a noob question, but I have wondered for some time the difference between TTY and terminal like rxvt-unicode or Xterm (and less shell). Is TTY just a virtual device which runs terminal emulator like rxvt-unicode which runs shell like sh or bash? If I have a freshly installed...
  4. P

    Solved Remote execution via Ruby-SSH starts different shell

    Hello, we are using net/ssh in Ruby to execute scripts on a FreeBSD machine, in order to do some checks for Nagios. Actually it is a brand new Pfsense applicance. The code is roughly the following: Net::SSH.start(@host, @user, {:password=>@pass}) do |ssh| erg=ssh.exec! "ls -al" p erg end...
  5. csptra

    Solved perl regex

    Hello, I admit, I am not proficient with regex. I'm trying to match a pattern taken from the output of reformime. (see below). I am not having much luck. When I can get it to work, then it matches everything. I think this is due to the working pattern matching the longer pattern. Sample...
  6. D

    How to show a progress or percentage bar on script?

    Hi, I'm a student and I have to create a script, but I want to show a progress bar when the script is making a backup. For example, I'm making a full backup of the FreeBSD system and while the script is making the job, I want to show a progress or a bar percent completed, is that possible on...
  7. R

    Solved update-alternatives for FreeBSD

    Hello, when calling the gpg command I want gpg2 to be executed instead of gpg1. Both programs are installed. In Linux I used update-alternatives for that. What would be the equivalent in FreeBSD? Thank you.
  8. CleanCut

    Solved Why won't my "new-style" rc script start at boot?

    On pfSense 2.2.4 (FreeBSD 10.1), my custom init script filebeat_wrapper won't start at boot. According to rcorder it should start right after boot: # rcorder /etc/rc.d/* /usr/local/etc/rc.d/* (snip) /etc/rc.d/SERVERS /etc/rc.d/DAEMON /etc/rc.d/LOGIN /usr/local/etc/rc.d/filebeat_wrapper (snip)...
  9. P

    Shell problem in setting default editor to vim

    I am on FreeBSD 10.2-RELEASE-p14 FreeBSD 10.2-RELEASE-p14 #0: Wed Mar 16 20:46:12 UTC 2016 amd64 Installed vim through pkg install vim. My Current shell is: $ echo $SHELL /usr/local/bin/bash My .profile file is edited...
  10. c00kie

    Shell tar: Option --transform is not supported

    hi I'm dabbling with shell scripting a little and trying to get a backup script running on FreeBSD. #!/bin/csh NOW=$(date +"%Y-%m-%d-%H%M") FILE="$NOW.tar" BACKUP_DIR="/usr/home/andy/backups" WWW_DIR="/var/www/" DB_USER="user" DB_PASS="pass" DB_NAME="dbname"...
  11. J

    Solved 'Command not found' even with full path

    Hi, I'm an intermediate-level user of FreeBSD. I recently ran into a problem that I have been unable to solve. Basically, most (but not all) commands now return 'Command not found', even if I use the full path, which makes no sense to me whatsoever. The only thing I can think of that...