1. M

    Shell Script for splitting PDF pages vertically, removing blank pages and white borders

    So I'm trying to process PDF documents containing shipping labels the following way: Each A4 page in landscape orientation contains two A5 shipping labels side by side, so simply split each A4 page vertically into two A5 pages. Remove any blank pages. Remove white borders from each page. I...
  2. F

    Solved Using rc.d script with /usr/sbin/daemon to start and stop a script

    I am trying to write an rc.d script to start and stop a (Python) script. Starting the command seems to be working, but stopping it is not yet the way I want. My goal is to ensure the script receives a SIGTERM signal when it should shut down; that seems not to be the case; I think only the...
  3. Spity

    Solved Help to run a simple script on startup

    How can run this script on startup? #!/bin/bash sudo kldload fuse sudo ntfs-3g /dev/ada2s1 /mnt/ -o -ro xdg-open /mnt/ &> /dev/null
  4. Márcio Rezende

    Solved Dialog: prgbox there is no output (no echoing output)

    Hi, pals. I'm trying to convert an old bash script that runs normally in cygwin and linux. For some reason the same command is not working on my FreeBSD box. It is just one line that supose to echo command output when used with command dialog --prgbox. If I use eval to execute bash (forking...
  5. Sergei_Shablovsky

    How to see which NIC is installed in which PCI slot by script ?

    Hi, FreeBSD guru! Is it possible at all to see which NIC is installed in which PCI slot by script ? As I know this may be something near the dmidecode and pciconf commands. But interesting to determine which exactly motherboard PCI slot are used for which NIC. I know that different...
  6. T

    Shell How to parse a text file?

    I am looking to parse a file for specific content that is on a line that always has a specific beginning, for example: "Program: code" I want to extract code on the line that starts with Program. I then want to add that extracted string into an already created file. Can anyone provide some...
  7. laundryboy

    Automating Transmission(Torrent) to use VPN while everything else uses standard connection.

    I've wanted to write up a tutorial on how to script the set up for getting Transmission to use a VPN connection, including inbound connections but havent had much time until now. I've read many articles using jails(I dont use jails), other distros and all of that helped me get it working on my...
  8. fullauto2012

    Shell DB backup Script

    Not real good with scripting. But, I through my hat in the ring. I was in dire need of a DB backup script that wrote to an inserted, but mostly unmounted rdx drive, regardless of mount situation. I also needed it to keep sanity in that backups older than 30 days needed to be pruned. Logs needed...
  9. Josh Rea

    Solved Shell Scripting Output to File and Screen

    Hello all, I wrote a script to direct all output to a log file, but I'd like to echo certain things during the process of the script to screen output if I can. I haven't been able to find anything related to this searching online, and the man page for sh is cryptic for me (as of now). Sample of...
  10. igorino

    Other Remove "...[C[0k" from expect output

    Dear all, How can I not generate the substring ...[C[C[C[0k after issued comands trough expect scripts? For example, I have the following lines in an expect script: #set variables, parameters etc ... spawn telnet $IP $PORT expect -nocase "name:" send -- "$USER\r" expect -nocase "password:" send...
  11. F

    Setup Script to run at boot using crontab?

    Hi, So I'm trying to set a script, so it starts on boot. The problem is, I'm using "@reboot" and I don't think that is working. I have: Tried modifying /etc/crontab as root using crontab -e -u syncthing tried various commands, IE: "@restart touch /home/syncthing/test" I have surfed the net...
  12. monchito

    Run Python Script -

    Hi all, i'm brand new on FreeBSD, i want to run a python script for pfsense firewall running on FreeBSD (FreeBSD 10.3-RELEASE-p9) this is the script I already installed beautifulsoup4 (py27-beautifulsoup-4.4.1) So, when i make this as root ...
  13. Preacher

    Shell 'Garbage' output during script execution (via cron)

    I have this script which checks for updates on my host system and on my jails: #!/usr/local/bin/bash PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/root/bin" # Updaten en rapporteren Ports Tree host system: portsnap cron update && { echo -e "Packages te...
  14. V


    To write a script, which checks the availability of computers in the network (the range of addresses in the /24 subnet). The Protocol displayed in the form of: IP-address –available/unavailable for each of the addresses. Please help, for earlier thanks for the answer!
  15. 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...
  16. daruffneck2

    Solved root or userland for cron job

    May someone can help me out. I want to use a script everytime my machine boots up. Execute before even the splash screen pops up. As I am the single user, I could set it as root in the crontab /etc/crontab following the handbook, so it would act for each other user. If I do so, do I set it as a...
  17. W

    Script to shutdown remote system?

    Ultimately, I want to shutdown a freebsd box from my android (there are lots of android apps to run scripts). I do not want to be prompted for a password. One step at a time, first I just want to shut down the remote from another freebsd box. The following did not work: #!/bin/sh ssh -t...
  18. 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)...
  19. Hornpipe2

    Perl Script to Plot Dependencies

    I was interested in seeing a graph of package dependencies, so I could trace which packages were needed by which in a complete tree. portmaster -l can give basic information (leaf, trunk, root, branch) but does not show the relationships. I wrote the following tool to list dependencies as a...
  20. Kalero

    SmartGit on FreeBSD

    Hi, yesterday, I attempted to install the latest SmartGit release on my FreeBSD (10.2) and, being written in Java, it should work. But when I run the boot script I get these exceptions: Error invoking SmartGit java.lang.reflect.InvocationTargetException at...