Category "bash"

How can I show the wget progress bar only? [closed]

For example: wget http://somesite.com/TheFile.jpeg downloading: TheFile.tar.gz ... --09:30:42-- http://somesite.com/TheFile.jpeg

bash script to check if the current git branch = "x"

I am very bad at shell scripting (with bash), I am looking for a way to check if the current git branch is "x", and abort the script if it is not "x". #!/

How I can directly login to rails console through ssh?

Time to time I repeat the following commands: ssh username@servername cd /projects/rails_project bundle exec rails c production I want to create a shell scri

grep after grep : No such file or directory

To create a test file contains blanks in the filename first: vim "/tmp/it is a test.txt" bash escape Search with grep: grep -lr 'bash' /tmp /tmp/it is

Prevent quotes from disappearing in JSON in between Azure DevOps tasks

I'm looking to enable static site hosting on a storage account, created by an Azure Resource Manager (ARM) template in in an Azure DevOps pipeline, but fail to

How to convert YYYYMMDDHHMMSS to a date readable by `date`

I have a set of date/time strings in the YYYYMMDDHHMMSS format that I want to convert to something readable by the date utility. Usually, I can do something li

How to define a cron expression that execute a script in the first monday of each month?

I have a script such as that: * * * * * path/to/my/script.sh I need to define the cron expression " * * * * * " to run once a month in the first Monday of ea

Colors with unix command "watch"? [closed]

Some commands that I use display colors, but when I use them with watch the colors disappears: watch -n 1 node file.js Is it possible to ha

Tmux window title keeps renaming

Suddenly, both my screen/tmux started changing my windows' names after every command. They keep changing the name to the value of $PROMPT_COMMAND on every singl

Pipe string with newline to command in bash?

I am trying to pass in a string containing a newline to a PHP script via BASH. #!/bin/bash REPOS="$1" REV="$2" message=$(svnlook log $REPOS -r $REV) changed

psql: command not found Mac

I installed PostgreSQL via the graphical install on http://www.postgresql.org/download/macosx/ I see it in my applications and also have the psql terminal in m

find: missing argument to -exec

I was helped out today with a command, but it doesn't seem to be working. This is the command: find /home/me/download/ -type f -name "*.rm" -exec ffmpeg -i {}

Find multiple files and rename them in Linux

I am having files like a_dbg.txt, b_dbg.txt ... in a Suse 10 system. I want to write a bash shell script which should rename these files by removing "_dbg" from

Set Jupyter Notebook password in bash script through environment variable

I have come across the following code in a bash script for automatic deployment and setup of Jupyter Notebook. There are issues when the password contains a #,