I'm starting to learn to use rest api via bash curl by writing a simple mastodon bot. I can attach multiple images using curl https://example.com/api/v1/statuse
Bash script used: #!/bin/bash set -xv IS=$'\n' list=$(cat exlist_sample | xargs -n1) for i in $list; do echo "$i" | rev > slist echo "$i" >> z
I have to print information about the user with the name given as a parameter. For example let's say ./script1.sh John should give me John Doe (username) -last
I am looking for the command or SDK, such as python, to generate new personal access token (PAT) in Github, but I didn't see any API for it. https://docs.github
Looking for solution to generate date in the below format: 2022-04-29T06:07:28.158Z Have to use in bash script.
Have some bash test code that have a spinner. Code seems like this #!/bin/bash sleep 5 & pid=$! frames="/ | \\ -" while kill -0 $pid 2&>1 > /dev/n
This works wrong script should delete only copies, but this script deletes all files #!/bin/bash DIR=$1 if [[ -z "$DIR" ]]; then echo "Error: files dir is
I am trying to write a script so that each time you execute it, it creates a batch of 10 files with increasing numbers starting with the last or max number that
I have this example.text > cat example.text 10.10.44.11 10.10.44.20 xa1-Y xa2-Y xb1-Y xb2-Y xc1-Y xc2-Y xd1-Y xd2-Y and I have this command: srxa_host_list
I am trying to launch networkQuality command in the background and live fetch the first part of the output to the bash script launching it. First part I want to
I'm trying to run only one instance of my back up script as a cron job. I know I can do it with a function that checks if the process is running: if pgrep -x rc
find /folder/202205??/ -type f | xargs head -50| grep '^Starting' There are 20220501 20220502 20220503 and so on folders... This command searches all first 50 l
I have a number of jobs. Typically I start the jobs manually by opening a number of terminal windows, and in each terminal window setting certain environment va
I'm sorry I can't provide the actual filenames for privacy reasons. names.txt contains several groups of lines separated by a single empty line. Each group pert
When I run the "ps" command, I can see all the processes I'm running, but for some reason, there are two identical processes(except for the PID ofc) running bas
I have a file called data.txt. when I read the file, the content looks like the below. $ cat data.txt name: linuxVol id: 6 type: Linux dir excludes: .snapshot*
Here's a simple reproducer: cat >sample_pipeline.sh << EOF set -x head
Please tell, how it is possible to execute it For example the person entered 24 and 24 appeared on the screen "ok", on the contrary when entered 24 and 23 perso
Okay, this is a bit convoluted but I've got a python script that digests a json file and prints a string representation of that file like so for id in pwds.keys
I have to write a shell script to accept the product order details as string input and display the total order amount and number of order under each category.