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

learn more… | top users | synonyms

0
votes
1answer
670 views

How do you display hostname in tabs of console2?

Is there a way to display the hostname as name of a tab in Console2? If I use cygwin and ssh to a remote host, I would like the tab name to reflect the remote hostname.
0
votes
1answer
449 views

Run a command in a tty and send/receive data from it in bash?

I have a program that requires a tty to work. How do I run this program in a separate tty to my shell and then interact with it? (by writing to the interactive stdin, reading from stdout)?
0
votes
1answer
283 views

How do I prevent Bochs translation of keycodes?

My native keyboard layout is "dk" (Danish). I am running Tiny Core Linux in a virtual machine (Bochs). The virtual machine is booting the bootloader where I have the possibility of giving the ...
0
votes
1answer
85 views

Segmentation fault when running bib2x

I'm working on an unfamiliar machine and I am trying to get a program called bib2x to work. Unfortunately, when I run the program, I keep getting a segmentation fault. My (limited) experience and ...
0
votes
1answer
1k views

need help cleaning out my Path Variable in Mac

when I typed $PATH i noticed a jungle -bash: ...
0
votes
1answer
246 views

using coreutils split file into pieces to different directories?

How can I use GNU's coreutils split command to split a large file into pieces of L number of lines each, but putting each of the different subfiles into different directories at the same time they are ...
0
votes
1answer
297 views

Bash Prompt Not Showing Colours (git)

I have the following in my .bash_profile, to give me git branch info in my bash prompt: # Configure colors, if available. if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then ...
0
votes
1answer
2k views

netcat and tee redirection via a bash script

Quick question that has been haunting me all day.. I have a bash script that includes this line: nc -l 8044 | tee nc-output & The output from netcat is never being written to nc-output. If I ...
0
votes
1answer
928 views

VIM zsh, bash and colors in command line on Ubuntu

I have problem with VIM command line when calling system commands. e.g. !ls, all command output colors aren't parsed by VIM. My system is Ubuntu 12.04 LTS with VIM 7.3.429 from Ubuntu repositories. ...
0
votes
1answer
103 views

Is there anything like emacs tramp for shell (bash/zsh)?

Say, we have a server where we use "userx" to deploy stuff and do some maintenance task. This user is being used by multiple team members. So, if I can not really modify the .bashrc or .zshrc the way ...
0
votes
1answer
1k views

OSX / Unix Terminal Color Template Change

I've been trying to decorate my Terminal on my MacOSX 10.7.3. As i surfed and found is to write following color codes into the file called .bash_profile: export CLICOLOR=1 export ...
0
votes
1answer
1k 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 ...
0
votes
1answer
121 views

How does the .profile file work if I fork a process?

Lets say I open vlc or gimp on startup, but those commands don't return until the program closes. Does it just let a bash interpreter run indefinitely until they close or does it run and immediately ...
0
votes
1answer
87 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
1k 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
475 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
75 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
642 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
450 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
191 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
537 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
851 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
454 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
220 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
647 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
212 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
432 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
58 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
124 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
230 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
398 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
497 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
851 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
879 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
326 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
546 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
26 views

explanation shell scripting code “ for loop”

Can anybody explain for me what is this loop using for, or how it works? for file in `ls *SC*`; do for content in `cat $file `; do scid=`echo $file|awk -F'.' '{print $1}'` printf ...
-1
votes
1answer
45 views

Read configuration file and assagin it into script variables

I need to read a configuration file and assign into script variables and omit commented lines, Sample configuration file: # This is sample configuration file SRV_IP=192.168.1.12 DB_IP=192.168.1.10 ...
-1
votes
1answer
51 views

Linux: 'Argument list too long' when I type anything

I'm working on Debian 8, and I've done something weird to my bash shell. No matter what I type, I see Argument list too long. $ ls -bash: /bin/ls: Argument list too long $ vi ~/.bashrc -bash: ...
-1
votes
1answer
136 views

command nohup tail with redirection in shell script not invoked properly under a particular situation

I have an issue where a tail command in bash script does not work correctly when called from remote by providing only 1 param out of 2 params. But it works correctly if: executed directly on local ...
-1
votes
1answer
58 views

command doesn't work in BASH

I have a script that checks if the users home dir is there here is the bit I'm stuck with j=`su $p -c df -h | grep $p` can anyone help me here? df -h won't work but df will work...
-1
votes
1answer
75 views

/bin/bash is gone?

I typed the following command, and now bash isn't working. $ sudo chmod a-x /bin/bash_old /bin/sh_old It just says: login: /bin/bash: No such file or directory.
-1
votes
1answer
31 views

bash change strings with multiple escape characters

Hello i try to automate for example change one variable in php file . root /tmp # cat defaults.inc.php|egrep "reply_all_mode" $config['reply_all_mode'] = 0; I try to first catch this by grep ...
-1
votes
1answer
105 views

$PATH not saving after exporting Imagemagick paths

I am trying to install Imagemagick using the official instructions. I have executed the three export commands: export MAGICK_HOME="$HOME/ImageMagick-6.9.2" export PATH="$MAGICK_HOME/bin:$PATH" ...
-1
votes
1answer
70 views

Redirect stderr to variable without debugging info

I want to save the stderr of this command to a variable. printf "1\r" > /dev/cu.usbserial The stderr is -bash: /dev/cu.usbserial: Permission denied. Good. But when I run this in a bash script ...
-1
votes
1answer
36 views

Trouble setting up the class path for MySQL and running MySQL via terminal

Question: what is the easiest way to run the MySQL app from the terminal What I have tried: Using some stackOverFlow suggestions I have used the following commands echo $PATH, produces ...
-1
votes
1answer
125 views

How to move files from recursive hidden folder to the parent folder on OS X

I have a music directory 5 level deep, each folder have music and image files and also a hidden sub folder named .unwanted, I want to move the hidden files from folders named .unwanted, up one level ...
-1
votes
1answer
373 views

Can't type anymore on Git bash after returning from ssh -tt

I wanted to execute a command in a remote shell in its interactive environment, so as to make it load my remote .bash_profile there first before executing the command. This works great: echo ...