This is more out of curiosity ... I've seen some examples of what I want to do, but in Perl. I tried to find a way to do the same in ruby, but to no avail.
I want a function to generate an MD5 hash from a word passed as an argument. The inten...
I have a shell / bash script that works perfectly for making backups, the problem is that I have large files that are giving problems in running the script. The script has to compress the file in tar.gz format and it does this, but when i...
I have the following query:
#!/bin/bash
db="bats";
table="promotion";
dbHost="192.168.0.246";
dbUser="root";
dbPass="root";
result='mysql -h $dbHost --user=$dbUser --password=$dbPass --skip-column-names -e "SELECT name FROM $db.$table WHERE...
I'm starting to mess with .BAT file, and created a command line. Example:
ping <nome do computador>
Below it would show me if it is online, it would look like this:
ping computador_1
ButIwantedtoputthenameofthePCorIPintoavariabl...
I would like to pass a JSON-style vector as an argument to a script.
Example:
#!/bin/bash
vetor[]=$1
echo ${vetor[*]}
i=0
for nomes in ${vetor[*]}
do
i=$(($i+1))
echo "Nome $i é $nomes"...
When I run script.sh via linux shell, this message appears: Gtk-Message: GtkDialog mapped without a parent transient. This is discouraged.
How do I resolve this?
#!/bin/bash
get_url ()
{
url=$(zenity --entry --title="Youtube" --text="...
Hello.
I have a lot of HTML files that have links in the following format: http://localhost:8080/tag:alguma_coisa and I need to add the .html extension to these links so they look like this: http://localhost:8080/tag:alguma_c...
I need to do some testing on the linux command line, but doing all the testing is very time-consuming, can anyone help me, if I can, write code in shell script to run all tests, and write output from bash in a txt file?
I have a folder called work and inside it I have 2 folders: p1 and p2 . How can I tell if the p1 and p2 folders are empty?
I have the following command
find . -type f -printf "%T@ %p\n" | sort -nr | cut -d\...