1. Sueno1123

    Custom autocomplete in BASH/ZSH functions

    I have written a script, and I need the tab autocomplete in my shell to only select files of a certain type (mp4, mkv, avi), just like rmdir's autocomplete only selects directories. Here's my (inelegant) script: #!/bin/bash [ -z "$1" ] && return command mpv "$1" || exit fd -q donefile && exit...
  2. B

    monit utility failed to start nscd daemon.

    Hi All, From the monit.log file, I observed that monit utility failed to start nscd daemon. The log in the, **/var/log/monit.log** file, nscd check file present at **/etc/monit.d/check-nscd** path and it contains, The **/etc/init.d/nscd** file, If I run following command on the...
  3. J

    New and need help

    Hi! My name is Matt and I am taking a Linux class and need help on an assignment. I have attached the instructions for this assignment. I believe that I have the first part down (it has 3 parts). I just need a push in the right direction for the rest. Any help would be appreciated!
  4. C

    Search for "letters" in a file

    Hello guys, i had a file called temperature.log inside this file there are only numbers (another script write numbers into that file) Sometimes the script runs into an error. At this point the script write letters in this log-file. i need a command (maybe an if statement) to check if there are...
  5. mobulos

    SinusBot Multiscript

    Hey guys, I just want to show you my SinusBot Script. With this Script, you can install 30 SinusBots at the moment (No limit after inquiry). The script is in German, but I'll do an English Version when there is enough demand. You can run the Script via Or have a look at my GitHub I'm working...
  6. J

    Shell Script

    I need to create a variable script that uses the "find" utility to search the home directory for files. Example; (./ data) The search also needs to be case-insensitive. The results should look like what is in the attachment.
  7. J

    Linux Shell Scripting Command

    I am having a problem getting the correct command to work with a shell script for the following. I need to save the text, "Logging Info:" with the current date and time to my file "logs.backup" inside my "LOGS" directory. Can anyone provide help with the correct command for this?
  8. U

    Encountering IF statement and tee conflict in script

    Hi All I'm looking to be able to correctly evaluate my IF statement and also output what has been backed up into a log file. In the function at the bottom I am stuck between getting the IF statement to evaluate correctly and managing to log what has been backed up (synchronised with rsync)...
  9. M

    Search directory and search File

    How can i first search with certain filename with wild card and then search a string in those filename and get the output. E.g Directory name : abc/def/xyz/ Files in directory : Abc12, abc13, abd12,abc14,abc15, abe12 and so on. First search : ab*12 Output : abc12,abd12,abe12 Now search...
  10. R

    Convert Old script file to systemctl

    I want to convert this old script file to .service file which is used by systemctl. I have converted as much as I know, but I am getting error code 1 whenever I try to start the service. #! /bin/sh ### BEGIN INIT INFO # Provides: daemonsync # Required-Start: $remote_fs $syslog #...
  11. Nemesis

    execute commands from .sh script don't work, wrong "space-signs"?

    hi all! I've been trying to get a .sh script to work the past days but I'm obviously not smart enough to grasp the concept, because it doesn't work. the script is suppose to send a message via messenger, and the program messer the "solution" but something isn't right, because it says Logging...
  12. J

    How to Execute After Read?

    In zsh, If i press enter before the read is finished, then the last echo command gets executed. Great! read -t 10 && echo 'bye' But, if i DON'T press enter, then the final echo does NOT get executed. How can i ensure the final echo gets executed if i allow the read to finish? thx
  13. J

    Clear steps to make an .sh file executable

    I've spent a half hour Googling about making an .sh executable but not found anything that works in my system. I'm trying to install/run/make executable the script at this link for saving/restoring desktop icon positions: I'm to the part...
  14. N

    run script to collect information every day but different directory

    Dear Any One, Please kindly help me to find out some way to collect information as below? zgrep "MCPKG" /centralizedlog/dsd0110{1,4}/afcdr/20190527/*.gz |grep success > save20190527.txt I would like to run this command to collect information and put it to output file as this example I can use...
  15. iridakos

    Remove duplicate lines from files keeping the original order (one-liner explained)

    Hi all, I published a post providing ways for removing duplicate lines from text files keeping the original order and a thorough explanation of how the awk one-liner works. Hope you find it useful
  16. D

    Looking to start a script in Ubuntu everytime a user logs in

    Hello, I've tried searching for this issue, but I cannot seem to get it right. I am using Ubuntu 14.04 right now, I wrote a script to restart a program/process. It's a .sh script. I was wondering if it was possible to get it to run automatically when a user logs into the system. I've tried to...
  17. A

    Looking For Lightweight Distro

    I am looking for a lightweight distro that I can use on a thin client right now and later replace with a raspberry pi. I need the thin client/raspberry pi to stream a video to and from a monitor attached to it and display a page with upcoming scheduled visits. I need it to be lightweight...
  18. M

    Strange /etc/ppp/auth-up script work

    Hello everybody! Sorry for not perfect English. Need help, I try to execute this script in /etc/ppp/auth-up: It this file, $1 is interface name like ppp0, ppp1 etc $2 is peer name (defined in /ppp/chap-secrets) #Script start !#/bin/sh if [ "$2" == "someusername" ]; then echo...