Bash is a free shell for Unix-like operating systems from the GNU Project.

0
votes
1answer
19 views

How to run a periodic scheduled job without at or cron

Scenario: You have a user with no access to cron and need to schedule a job (say an rsync of a directory). The use of at is not an option as you don't have a fixed end date. While I bet there are ...
0
votes
0answers
9 views

Not able to export key in cygwin bash: -bash: $'\302\226\302\226gpg': command not found

So just today I installed cygwin and its default packages, and then since GPG wasnt a part of it, I installed it manually by running setup wizard again. I needed to make a 2048 RSA GPG key and made ...
1
vote
1answer
23 views

How to search file on linux with like atribut?

I want to find and delete log file on linux Terminal.Usually I use thisfind -name '*.log'after the File found, next use this scriptfind -name '*.log' -type f -deletethat script work for ...
0
votes
0answers
9 views

Is it possible in bash to complete the middle of a word?

I have a simple bash completion script for my custom git branch searcher.#/usr/bin/env bash_branch_completions(){local word="${COMP_WORDS[COMP_CWORD]}";if [ ! -z "$word" ]then...
0
votes
1answer
7 views

.inputrc key binding not working in PHP artisan tinker

I am currently using GIT Bash on Windows 10 with custom key bindings in the etc/.inputrc file. This all works fine.However when I am working with Laravel "php artisan tinker" Shell, the key bindings ...
1
vote
1answer
44 views

Ctrl D not exiting bash after sourcing bashrc

The bashrc was not written by me, and sources a lot of different configuration files. Upon sourcing it, I can't exit bash with Ctrl+D anymore.I found this related question about zsh, and I would ...
0
votes
3answers
53 views

move all files in local directory to remote directory

I want to move all files in local directory to remote directory. And I am using this code to achieve itSOURCE_FILE=/var/www/oneserver/*TARGET_DIR=/var/www/anotherServerARCHIEVEFILE=/var/www/...
0
votes
1answer
26 views

How to copy environment variables from local shell to a remote ssh connection inside a shellscript?

I am currently working on a shell script that is used to build docker images and restart containers running on the remote host. below is the stripped down version of the code.#!/bin/bash -xe# ...
0
votes
2answers
30 views

How to sort a tab-separated file?

I'm trying to use sort to sort a tab-separated file like this one:Fruit Color Origin Categorypear green Oviedo–Gijón–Avilés Oviedo–Gijón–Avilésstrawberry red ...
1
vote
1answer
21 views

Terminal is not running any command after using command “cat > .bashrc”

I was customizing my terminal by screenfetch. after installing screenfetch in my ubuntu, I have used some commandcat > .bashrc# Start Screenfetchscreenfetchthen I pressed ctrl + d and closed ...
0
votes
2answers
29 views

Bash scripting: run a shell command from inside a script with variable inside quotes

I need to load a db into a mysql server and the following command works from the shell:From shellmysql -h "172.17.0.2" -u "root" "-pmypasswd" -Bse "create database mydb;"But not from the script, ...
0
votes
1answer
46 views

Assign values to variable from text file. Search for the string in file. Replace the string in file?

I am working on a project where I need to correct some thousand lines of data. I have already completed the half work and now I am stuck on final part.I have a file called tree.txt which has list of ...
0
votes
1answer
28 views

can't find mistake in sed substitution [duplicate]

I'm trying to substitute include guards in headers with same include guards, prepended with #pragma once:#ifndef _HELLO_H#define _HELLO_HBecomes:#pragma once#ifndef _HELLO_H#define _HELLO_H...
0
votes
1answer
46 views

Cronjob taking a screenshot every hour with scrot

One of my users needs a webpage screenshoted every hour. I was able to find a utility called scrot and it was easy setting up a cronjob to run every hour. My issue is it takes a screenshot of both ...
0
votes
1answer
17 views

How to stop git-bash shell from waiting for process to finish?

Based on a solution to How do I open a new git bash terminal window at my current location in windows? I can use$ git-bashto launch a new terminal from inside a git-bash console window.However, ...

153050per page