script

  1. hal_sk

    [Solved] Script does not run after reboot (systemd)

    Hello, I have simple script /usr/local/bin/test.sh #!/bin/bash echo $(date) >> /home/hal/Desktop/log Then I have this service file: /etc/systemd/system/test.service [Unit] Description=Test service [Service] ExecStart=/usr/local/bin/test.sh [Install] WantedBy=multi-user.target Then I run...
  2. S

    Seeking advice to write a linux script

    Hi all, I need to write a script running following commands on browser checking my websites; https://transparencyreport (dot) google.com/safe-browsing/search?url=example1 (dot) com https://transparencyreport (dot) google.com/safe-browsing/search?url=example2 (dot) com...
  3. T

    How do I auto-run a script when I change User?

    Mint 20.04, Ryzen 5-4500: Hi, I am developing (Lazarus-FPC) some bespoke internal+external email-software for my Son's business and I need to isolate it from the Internet while testing. I have created a Standard-User "Test" to work there and I need it to crash at "no Internet" to handle errors...
  4. D

    Sensible way to manage sudo commands from script?

    Hey guys! I have a script: ~/.local/bin/did-keyboard to manage the loading of xkeysnail with my specific configurations. I normally run it as did-xkeysnail --load, and it asks me for my sudo password since I have multiple sudo commands in there: sudo kill ..., sudo nohup xkeysnail... (since...
  5. D

    [crontab][not-working]command='redshift':

    Hello, I use a dummy script at '/bin/rdshft.bash' for a single shot applying of 'redshift' command with its options, the content of the command 'rdshft.bash' is: #!/bin/bash redshift -v -P -l 28.00:78.00 -t 3200:2400 So, yesterday I decided to add the 'rdshft.bash' to the crontab for automatic...
  6. M

    Log new directories (created in a certain place) in a file

    Hi all! I need to do the following: Monitor a certain directory (for example, /media/server/ ) for new directories being created. If a new directory is created, it should be written in a log file. The goal is to create a system (using cron), which periodically checks whether new directories...
  7. J

    Shell Script

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

    Linux Script Command Help

    I need the correct commands for "adding a blank line after my previous commands output" and "displaying a message on screen indicating the script is done running. For adding a blank line I've tried "echo" after the command but it doesn't work.
  9. 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?
  10. B

    Linux Project

    Hello, I have a personal project that includes some ideas of using Oracle VM, monitoring and some network commands. So far, I have two VMs that can communicate with eachother, I made a database using mysql on one of the VMs and on the other I want to access and see the database on a web server...
  11. Tolkem

    Can you give some ideas on how to improve script?

    Hi everyone! Hope you're all having a nice life! :) So, I took over practicing/learning bash scripting (once again :D). I'm not very good at it and my knowledge is very basic. Last year I wrote a script to practice the use of if statements if something_happens then do this else do this what...
  12. 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)...
  13. D

    Can't Figure out how to Script to run at Reboot on Ubuntu 20.04

    Hi I'm working on a Panasonic Toughbook CF-31S MK3 and am working to get the Touchscreen to Calibrate automatically on startup. I have a script that works when run by itself, however I need to be able to have it run automatically on reboot/startup so that I don't have to manually run the script...
  14. M

    Shell script linux

    I am really struggling with a homework.I have to make a shell script that will copy to a separate path the files in which the user modified more than 20 lines on a specific date.The files should also be archived and them deleted. What I know right now: To copy a file somewhere else i use this: $...
  15. 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 #...
  16. Nemesis

    Cron runs a non-existing variant of . sh script

    I've been encountered a strange phenomena. I've been messing with Cron, so it runs a script called startup.sh, which it does. First I wrote the script to send an email, but later I rewrote it to send a message instead. However, when restarting the server, nothing happened. Then I checked the...
  17. E

    INTO OUTFILE ERROR 2

    Good day, I am trying to run the following command but it does not seem to work. [[email protected] ]# mysql -pPassword asteriskcdrdb -s -b -e "select 'Account ID','Destination','Operator','Provider','Date','BillSec','Rate id','Cost' UNION select...
  18. G

    File Permission of The Sh Files

    I have a Directory where a lot of bash script or sh file exist. I want to change their permission to the 770 with the chmod command. How can i accomplish that? Thanks.
  19. G

    Bash User Input

    I am writing a script which requires user input. How can I prompt for user input to use in my bash script.Thanks for your offer to help. I'm very grateful.
  20. D

    Mapping network drives in Ubuntu from Windows domain (script)

    Goodnight, First of all, inform you that I am the most novice level that there is in Linux, I am starting in this world, and I am trying to perform a task. After getting to put a Linux machine in a domain with Active Directory in Windows, I get to map the network units manually, however, my...
Top