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

learn more… | top users | synonyms

5
votes
2answers
783 views

Why is bash completion being loaded so slow on OS X?

I don't understand why bash completion is loaded so slow on my MacBook Pro. I did the following in my ~/.bash_profile: echo "Loading BashCompletion..." if [ -f /opt/local/etc/bash_completion ]; ...
4
votes
2answers
238 views

Unable to launch application in tmux

I get this error when I try to launch Sublime Text or SourceTree from tmux: $ subl Unable to launch Sublime Text 2 $ stree Unable to open SourceTree It seems that I can't open os x apps either: $ ...
4
votes
2answers
192 views

Ruby commands are turning off tty echo

After running Ruby scripts, almost 100% of the time, the bash command line will appear to be inactive, while in fact it's silently accepting my keystrokes without showing them to me. This has ...
3
votes
2answers
122 views

Assistance setting up an efficient vagrant system

first time on superuser; I'm a novice trying to move from humble local wamp development to a more professional and productive vagrant/linux environment At the moment I have a basic vagrant file which ...
3
votes
2answers
931 views

Filter tail command through multiple grep commands to separate files

What I am trying to do is filter the output of one log file into separated log files based on a grep filter. tail -f test.log | tee >(grep "Error" > error.log) >(grep "Warning"" > warning.log) ...
3
votes
2answers
225 views

restrict rsync (or bash script) to a directory

After a bad accident with rsync deleting wrong files due to wrong destination parameter, I want to restrict rsync (or the bash script running it) to be able to delete/modify files only under a certain ...
3
votes
2answers
497 views

How do I disown/detach a process from the Git Bash terminal that come with Git's Windows installer?

I would like to run commands from the terminal (mostly Python servers) and essentially daemonize them. I am running the MinGW terminal "Git Bash" that comes with the Windows installer for Git. ...
3
votes
2answers
1k views

How to create limited user accounts in Linux

I want to create a user account for each of the key programs installed on my debian server. For example, for the following programs: Tomcat Nginx Supervisor PostgreSQL This seems to be recommended ...
3
votes
2answers
586 views

Is there a way to use inputbox and enter multiple lines?

I want to have a simple way to enter messages for employees to see upon logging in. It doesn't have to be date specific, although that would be nice, but I can't find a way to use dialog to allow me ...
3
votes
2answers
273 views

CTRL-[keys] and arrows not functionning in terminal / ipython

I'm using ipython Inside the python shell, when I press up instead of showing the last command, it prints ^[[A also CTRL-[keys] are fubar. CTRL-p prints ^P Everything is normal under ...
3
votes
2answers
340 views

Wrong linebreak on SSH connection when scrolling back in bash

I have a Bash Terminal via a SSH connection in GNOME terminal. Server is Debian Linux, Client is Ubuntu Linux. The output of long lines is displayed well, but when I use the UP-key to scroll in the ...
2
votes
2answers
33 views

One-line code in bashrc to edit pdf

I would like to have a one-line code in bashrc, for removing the first page of a pdf. The command to be typed in the bash prompt could of the form: cut name.pdf This command should remove the ...
2
votes
2answers
74 views

My cursor is at the beginning of my bash prompt. Any ideas why?

I'm using a slightly modified version of Gary Bernhardt's (destroyallsoftware.com) .bashrc with homebrew bash 3.2.51. # . ~/bin/bash_colors.sh . ~/bin/colorize.sh [... snipped ...] # ...
0
votes
1answer
77 views

git-number not working on Linux: sh: git-id: not found

I've set up the script git-number on my Cygwin computer without any problems. I've put all three required scripts in a folder in my home directory called bin/ and everything works fine. Now I'm trying ...
0
votes
1answer
966 views

Give permissions to www-data user to run a local script

I actually try to launch a gnome-terminal with a PHP script, and seems I have some problems with the users www-data; My script only makes an ls -l command in a directory (is just for a test) and I ...
0
votes
1answer
373 views

bash formatting to csv file

I have a bash ldapsearch in a while loop what I want to write to a csv file. The ldap listing looks like this: ou=..,dc=.. data1 out=..,dc=.. data2 My goal is this format in the csv file: ...
0
votes
1answer
72 views

Bash mingw change behavior of readline overnight

Yesterday everything was working fine, but today things got crazy. Git no longer produces colors, the delete character produces ~ as well as the endline, begin, end, etc. And finally, when a line if ...
0
votes
1answer
521 views

Remap shift-tab to tab in bash/screen/putty in Linux?

Well I use vi-mode in bash via the set -o vi command. What's annoying is when I'm typing words in capital then try to complete using tab but don't release the shift-key fast enough, it brings me out ...
0
votes
1answer
381 views

List all SVN repository URLs from a folder in recursive mode

We are looking for a script that will traverse in recursive mode all subfolders and list all SVN repository URLs and the path where it was found. It will be used on /home folder of a user.
0
votes
1answer
1k views

Trap ctrl-z key to perform cleanup

All, I have a shell script where I want to call a function to do some cleanup if user presses the ctrl-z key(SIGTSTP signal). I read about the trap command and found an example where I can trap the ...
0
votes
1answer
155 views

Can I use bash features such as word completion and scrolling in SFTP?

Is it possible to use the bash features such as word completion, reverse search, scrolling, etc. in SFTP? When I try the scroll feature with the up-arrow, it always writes the symbol ^^^.
0
votes
1answer
404 views

How to fork two process in inittab without waiting one to finish?

I know how to fork to process. That is not a problem. But my issue is a little different. Example inittab line: ::respawn:-/usr/bin/python /path/to/script.py && /bin/sh -l -c 'chown ...
0
votes
1answer
632 views

rpm spec file with 'cat' problem

Im writing spec file in which i want to place script to run process from init.d directory. Here it is a part of SPEC file: %prep %{__cat} <<EOF > myapp.run prog="IMG APP BACKEND" ...
0
votes
1answer
405 views

Is there a resolution to autocomplete in bash escaping export variables?

Export variables in bash are now escaped with auto-completion (tab). A change linked to in another post here at Superuser. Is there any change to this issue?
0
votes
1answer
200 views

FreeBSD 8.2: Keystrokes in Bash do not show up

I just installed the latest FreeBSD 8.2 distro using Parallels Desktop. Problem: Whatever I type in the Bash/Shell it is not echoed on the screen. It's behaving like a password prompt. As soon I hit ...
0
votes
1answer
631 views

Mac - Run script on startup and another on shutdown

I'm trying to figure out how to get two shell scripts to run automatically. One script to run when the mac is turned on. And another to run when the computer is about to shut down. I'm guessing for ...
0
votes
1answer
297 views

Meta-* / “insert-completions” Fails for Completions Defined via “complete -F …”

I wrote a simple completion function that is doing what I want with one exception. Its completions are not expanded when I type M-* ("insert-completions") the way file completions are. Is this an ...
0
votes
1answer
209 views

bash, mirroring of multiple directories (hard linking)

I have 5 FTP users that upload files (and subdirectories) in their home directory, i need to mirror theese directories beetween them and with a "master" directory (accessible from a 6th user). Files ...
0
votes
1answer
376 views

How can I give psql a variable instead of an sql file as input?

So I have some sql in a varible. I could put that in a file and give it to psql as input but I wonder if there is an easy way to do this without the file ?
0
votes
1answer
57 views

Is there a tool similar to microsoft system centre configuration manager available on in Linux?

I am looking out for a tool similar to microsoft system centre configuration manager on linux platform which is available with GNU license and that can be used for doing multiple tasks like to ...
0
votes
1answer
121 views

If lan is connected?

I want to write a script and put it in /etc/rc.local so that if lan is connected then rfkill block all else nmcli con up id 'Network id' --nowait How should I write the if part and how should ...
0
votes
1answer
210 views

Shell doesn't display input characters after “tail -f”

I use "tail -f" to monitor log files. After interrupted by ctrl-c, the shell doesn't display my input chars from keyboard any more. Something like terminal> tail -f /log/a.log then ctrl-c ...
0
votes
1answer
296 views

How do I integrate VirusTotal with Nautilus?

Here's a great site: https://www.virustotal.com/index.html Does anyone have a how to/link, how to integrate a menu in Nautilus? Like: "send file to Nautilus" when right clicking a file? Theres an ...
0
votes
1answer
392 views

Couldn't create error file for command: no such file or directory

When launching tclsh, I am getting this error message: couldn't create error file for command: no such file or directory Can't find out what causes this to happen. How to fix this issue? My ...
0
votes
1answer
304 views

How to stop redirection to /dev/pts/x

This is an examination senario. We have mulitple users logging into a RHEL-4 server using putty. These people are part of a same group. They are giving UNIX shell script exam. They are helping each ...
0
votes
1answer
692 views

How to run script before starting vpn connection?

I need to run a bash script BEFORE connecting to a vpn (which I do by clicking the network manager applet). I need this script because when connecting to the vpn the routes are incorrect. The script ...
0
votes
1answer
842 views

Solaris bash script / search and append field to end of line in /etc/group

I need a bash script that will modify /etc/group to append and delete NIS users to specific local groups on a Solaris 10u8 system. Preferable one or two functions with uid and groupname as varibles. ...
0
votes
1answer
295 views

How to exclude HTML elements by ID or class using HTTrack or bash script

I need to copy a website, but I want to exclude specific HTML elements by ID or class in all pages (using a bash script). I need this because I don't want ads or some other annoying features of some ...
0
votes
1answer
422 views

How do I keep gnome-terminal width from changing when I use “reset”

When I use reset in gnome-terminal (bash, Ubuntu 9.04), the window width resets, though the height does not. On my personal computer, this does not happen in xterm or konsole. On my work computer ...
-1
votes
1answer
82 views

POST to web form using CURL & BASH

I'm trying, without success, to use cURL to post data to the form on this URL: https://nic.ar/buscarDominio.xhtml how can i correctly send the request to the server? I've analysed the post data ...
-1
votes
1answer
97 views

How to use HTML markup tags inside Bash script

I have crontab and a simple bash script that sends me emails every often containing PHP, NGINX, MYSQL errors from their log files. This is a simplified example. #/home/user/status.sh ...
-1
votes
1answer
39 views

how to retrieve following error when i execute shell script

I have one script to log into remote server.But i tried to Execute the script some error occur. Logs: My script: #!/bin/bash S1=$(ssh -t selvam-odc-shell1 "users | wc -w ") S2=$(ssh -t ...
-1
votes
1answer
88 views

bash script with lftp with redirected input

I need lftp to connect to a list of hosts from a list file which are in IP address format. Then, if a ftp server is up, log that address (and if possible, device type, in this case routers) to a text ...
-1
votes
1answer
3k views

How to run bash script as root on startup?

I am having some problems with this, I have a script that is supposed to start airodump-ng on boot but it usually only runs the first part of the script and thats it. I have tried creating a systemd ...
-1
votes
1answer
137 views

copy files from one directory to other in loop

I am not bash expert. I need to write a script to copy latest (by date) file from one folder to another as following from /test/a/date1.bak /test/a/date2.bak /test/a/date3.bak /test/b/date1.bak ...
-1
votes
1answer
178 views

How to allow user to input file names in bash script

I've got this script I called it "r1": for f in "$@" do fpath=`dirname "$f"` file=`basename "$f"` arc=$fpath"/"$file".rar" rar a -v1024000 -r -m0 -ep1 -o- "$arc" "$f" done It works well but I am ...
-1
votes
1answer
199 views

Can I have 2 folders from 2 different servers in sync one way

Can I have 2 folder from 2 different server in sync one way! I have a Windows server, Server 1 :public server a Windows server, Server 2: local on my network :under NAT The problem is that I get ...
-1
votes
1answer
819 views

paste multiple lines string to CMD or Bash variables

I want to copy multiple lines (splitted by Enter key) from, for example, notepad and then paste it into new variable in CMD or Bash console and after that do some operations on it. Although it's ...
-2
votes
1answer
37 views

Bash executing command

Can anyone please give me the list generated by this : -{ for i in {1..100}; do lynx -dump -nonumbers -listonly [http]://www.dailymotion.com/user/MTDCafe/$i ...
-2
votes
1answer
115 views

Bash- how to select a directory based on the number of files it contains

I want to select all the sub-directories in a given folder that have a certain number (in this case, 75) files within them. Then I want to take the name of each of these sub-directories and assign it ...