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

learn more…| top users | synonyms

1
vote
0answers
13 views

Background processes invoked from .bashrc (in tmux session) die when tmux exits?

This is a doozy to explain, but here's the behavior I'm observing:# ~/.bashrcif [ -n "$TMUX" ]; thensleep 100 &fiWith this in my .bashrc, I can launch a tmux session, pgrep sleep, and ...
1
vote
2answers
40 views

How to exit from infinite loop in parent terminal?

To test trap command I created the following loop in terminal:while true ; do echo BEGIN ; bash -e ; echo "exit code=$?" ; echo END ; doneHow to exit this loop and turn back to the parent shell?...
-1
votes
2answers
29 views

bash + how to capture the requated field from variable

we set the variable with the follwing valuesMY_VAR=" one two three four"how to capture the first value from variable with bash? ( without using echo command ) expected output one
0
votes
0answers
26 views

powershell/cmd suddenly disappears when executing cli programs but they keep on running

I am having issue with my command line. Sometimes when I run some script my powershell/cmd keeps closing/crashing but I know that the program is running because when I open my task manager those ...
0
votes
0answers
18 views

Application mysteriously disappeared

I installed the Storj service on a Lubuntu machine, set it all up, and got it running. I verified that it was running, and even came back a day later to check on it. Then a couple days after that I ...
3
votes
1answer
109 views

printf command wildcard interpretation

I am wondering what behaviour the printf command follows, when using wildcards. This question was originally asked me by someone else, but I am confused by the behaviour myself and would love an ...
1
vote
1answer
19 views

how to use xmllint in order to get value from xml

I have the following XML file<?xml version="1.0" encoding="UTF-8" ?><!-- Component configuration file --><Component><Name>install_env</Name><HelpString>...
0
votes
1answer
24 views

Variable printed the expected value but actually its value is different

The following syntax used in order to capture the word between <Name> in .xml file. I also use xargs to remove any spaces.$> var=` find /tmp -name '*.xml' -exec sed -n 's/<Name>\([^&...
-1
votes
1answer
16 views

sending argument to vim using grep

I saw this question but I couldn't implement what I'm looking for.Here is what I want:I have a file with a few lines ending with 4.1.01.97 (same number for all lines - but number can change from ...
0
votes
1answer
21 views

how to echo text into a file from the CLI to ammend a variable in the file? [duplicate]

using Centos7e.gvi test.txt test.txt contains the following informationx=100y=200z=300I want to put a command into the CLI such as echo x=250 >> test.txt but instead of x=250 being ...
1
vote
1answer
59 views

bash + how to avoid specific messages in the log file

when I run the bash script on my Linux machine we get the following errors in my log , note - we set in the script:exec > $log 2>&1 , ( in order to send all standard error/output to $...
0
votes
1answer
21 views

How to install package from a .tar.lz file

I'm using bash (Cygwin, specifically). I'm trying to install GNU dd_rescue, which comes in a .tar.lz archive file.When I use:tar -xzf ddrescue-1.22.tar.lz...it returns with the following error:...
0
votes
1answer
83 views

mv within shell script does not move files

Often discussed, yet the answers did not get me to a solution unfortunately, and I am a bit ashamed that I need to ask this question again. But, here we are.I have a shell script dosomething.sh with ...
1
vote
0answers
8 views

extend gnome-shell PATH for access to ruby binary with RVM

I have a terminal written in ruby that I install with a gem. I want to be able to launch this terminal when I hit Alt+F2 in gnome-shell. When I used the ruby version of my system, I just have to ...
1
vote
0answers
17 views

Ctrl R not showing latest history

On mac when I try to search my history of commands I get only very old commands. No new command is saved in history. You see here that after history I did a command fdfsdfsd but then if I reopen the ...

153050per page