bash script

  1. Z

    Check if background process is running or not

    On my Synology DS215j I have a scheduled task, that is executed every 5 minutes and checks, if a specific python script is running: #!/bin/bash # Import environment variables ... . /etc/profile PYSCRIPT="" if ! ps ax | grep -q "$PYSCRIPT"; then echo "$PYSCRIPT is running"...
  2. L

    Need help with Bash

    Hello, Got a Bash Scripting issue. It has to be done with bash. I've been trying everything from SED to other tricks... Can't seem to get it right. I need to be able to replace a whole line with a random number and prefix in a text file. Example: ABCD123456 The letters are the preset prefix...
  3. iridakos

    CLI for daily notes

    Hello, I made a CLI tool to save, access and organize daily notes. I named it stup, it derives from the Standup meetings since its initial purpose was to cover my need for keeping my Standup notes in a convenient way. You can find the script and more information about its features on GitHub...
  4. A

    Need help with time conditions in BASH scripts

    Hi folks, I'm going to need help, and I hope someone can share experience with me. So, the task is to create a bash script which will parse the JSON data from a REST API (which totals a number of errors at a certain period of time). The output is to get the number of errors in the last 5...
  5. P

    Remove/delete not working in bash script

    I have a text file(.txt) containing a list of files (one per line) which have to be deleted from a folder on my server. The files to be deleted from the server have to match names of the files in the text file. I wrote a small bash script to do this. Did some research online. When I run the...