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

learn more… | top users | synonyms

0
votes
0answers
140 views

stdbuf not working while unbuffer does

I am trying to apply timestamps to stdout of a process. For the proper timestamps to be applied, I attempt to unbuffer stdout of the process. This works with unbuffer but not with stdbuf as I would ...
0
votes
0answers
98 views

Unable to run tmux on OS X

So I got brew on my mac and I had tmux installed and running just fine. Then after I refreshed my system every time I try to run tmux i get this error: "-bash: tmux: command not found" So since I'm ...
0
votes
0answers
33 views

How can I get bash to perform case insensitive tab-completion for my aliases and functions?

I have a alias like this: alias sshUntrusted='ssh -X -C -c blowfish-cbc,arcfour' when I type: $ sshun bash does not complete this alias I have put set completion-ignore-case on #ignore case ...
0
votes
0answers
12 views

getting disk identifier from the disk name

Is there a way to retrieve the disk identifier from the disk name? For example I have a disk partition /Volumes/Data and I would like to store the disk identifier in a variable. Any help?
0
votes
0answers
146 views

Script to open mutliple terminals with multiple tabs each, move and resize these and execute commands

So I am trying to make a bashscript, which does the above mentioned. Background is that I have to keep an eye on lots of logs, and theres have to have opened many console side-by-side. E.g. one ...
0
votes
0answers
198 views

Kali Linux: Renaming files in bin

I'm just curious. I want to rename files in /bin such as - ls --> als //after I change it, the ls command no longer works and I have to use als instead - adduser --> aadduser - chmod --> achmod so I ...
0
votes
0answers
40 views

redirect tar notices when used with pipe

I have a remote backup cron script that contains the following line: cat ${list} | xargs tar Jlcf - | ssh -i /root/.ssh/backup \ seron@dummy.net "backup_${DATE}.txz" It gives tar a list of ...
0
votes
0answers
49 views

how to list all CNAMEs of the current server in the bash prompt?

I have servers with a generic names (e.g. eu1.example.com) which has a set of useful CNAME (e.g. mail.example.com, rocket.example.com). How can I list the CNAME in a bash prompt, to go from ...
0
votes
0answers
36 views

Running fsck with other program and UDEV in bash

After much trouble I got the UDEV rule to run after inserting an USB. It runs a program to convert the names of pictures and movies. I use {} & to run the program in the background: The only thing ...
0
votes
0answers
620 views

setting https_proxy environment variable in a secure way

The following is the standard way suggested to set the environment variable for the https_proxy: export https_proxy=<username>:<password>@<proxy>:<port> But it clearly ...
0
votes
0answers
38 views

Automate whois lookup with Automator

I would like to automate a whois query script using automator. And as I have read from a past Q&A, I've already done this: Get Specified Text xxx.xxx.xxx.xxx Run Shell Script for x in "$@"; ...
0
votes
0answers
47 views

Vagrantfile - is rvm in ~/.rvm/scripts/rvm or ~/.rvm/bin/rvm?

I'm still learning my way around some of the more hidden files in terminal and I was trying to setup a Vagrant box with rails via shell script provisioning, with some help from these links: ...
0
votes
0answers
41 views

Copying .bashrc and .profile does not change anything?

I have a root bash profile setup which has autocomplete and all the nice colours, but there is nothing setup for my actual user (non root). So I decided to copy the files .bashrc and .profile from ...
0
votes
0answers
64 views

Save rows effected from mysql delete statement in bash

I am trying to create a bash script that will connect to my database and purge older records, I would like to keep a record of the number of rows are deleted in a file (lets call it rowseffected.log). ...
0
votes
0answers
52 views

Capture user input to “kinit” - Works on OS X, but not Linux via “script”

I have a script that was written on OS X and utilizes the "script" command. With the -k flag it will log keys sent to the program, but that option is not available in the linux version of "script". My ...
0
votes
0answers
218 views

How to check via bash if your connection is wireless N/G/… on Linux?

iwlist scan shows me the available wireless connections. I can see Frequency:2.412 GHz for the channel I'm connected to. This article shows that a frequency of 2.412 GHz means that you are using ...
0
votes
0answers
16 views

(MAC) Change location of shell script's shell

When I make an executable shell script ("http://chimpy.wordpress.com/2010/08/29/mac-os-x-shortcut-link-to-python-script/", but without the python part), It's pointer location (The location commands ...
0
votes
0answers
36 views

open a new screen in linux, no access to perl local library

I added my perl local library to my shell startup script (.bashrc) and when I start a terminal in linux: $ echo $PERL5LIB /home/perl5/lib/perl5:/usr/share/vcftools/perl BUT when I open a new ...
0
votes
0answers
88 views

Mac OS X Terminal Error: undefined method `grep'

Every time I enter a command, or even just hit enter, in Terminal I get this line below the output: -e:1:in `<main>': undefined method `grep' for #<String:0x007feea31354b8> ...
0
votes
0answers
48 views

automatically prepend variable in for loop without having to put variable on each line

Is there a way to automatically have the $i variable prepended to the beginning of the command without having to specify it each time? Here is my current script. #!/bin/bash for i in "command ...
0
votes
0answers
102 views

Error uncompressing file when piping curl to gunzip

I need to download a gzipped xml feed to parse in my Ruby app. It may well be quite large, 30Mb compressed, 300Mb uncompressed. So I do this: curl -s http://example.com/file.xml.gz | gunzip and read ...
0
votes
0answers
31 views

Why am I not receiving any system e-mails?

In my crontab, I have the following: * * * * * sh /home/rimmer/test.sh In /home/rimmer/test.sh I have the following: #!/bin/bash echo 'test'; I have also set chmod +x /home/rimmer/test.sh, of ...
0
votes
0answers
80 views

Bash, transforming a string list of words in a array

Sorry if I post a question on a topic discussed dozens of times. I'm trying to work on an element of an associative array and assign it to an array. I know that in bash associative arrays are ...
0
votes
0answers
19 views

Is there a way to enable either vim or emacs bindings for the tmux command buffer?

Normally, when we type a command to tmux, we do <Prefix>:, and get a line to type on at the bottom. Is there some option to set that command buffer to use either vi or emacs bindings for ...
0
votes
0answers
50 views

Bash MinGW ignoring Ctrl+O key combination

In Bash MinGW on Windows 7, I would like to use Ctrl+O to perform a history search backward. However, I can't get this work -- i.e., this line in my ~/.inputrc does nothing (although it does work on ...
0
votes
0answers
70 views

msysGit (Windows) and gpg-agent

Does anyone have a working setup to use gpg-agent in combination with msysGit on Windows? I have a setup for ssh-agent and it works fine but I can't get gpg-agent to work on Windows. I tried both a ...
0
votes
0answers
40 views

I'm trying to list size of folders plus selected files on a portable disk

For the purpose of finding the location of my data among many portable disks, I'm trying to create plaintext lists of the contents of all folders and files of certain extensions and sort them by size. ...
0
votes
0answers
110 views

Correct way of setting Ruby2.1 as the go-to application when it referenced to/called via shell?

I have installed Ruby 2.1 on my headless Debian server (7.4) by downloading the source from https://www.ruby-lang.org/en/downloads/ and then running the routine of ./configure make make install ...
0
votes
0answers
47 views

Exporting Variables – Reading Them Returns Blank?

Hi – I'm using Mac OS X (Mavericks), which should be UNIX compliant. In my .bash_login, I'm exporting variables for Cocos2D-X. I know this is executing, as I have a 'echo Test' line that executes ...
0
votes
0answers
59 views

Ubuntu: `env -i bash --norc`, but include essential variables such as HOME, DISPLAY? (where are these set?)

Is there an easy way to isolate a session of bash so that only essential variables (HOME, USER, DISPLAY, etc.) are preserved? (essential in that many programs fail if HOME, DISPLAY, TERM, SHELL, etc. ...
0
votes
0answers
141 views

Terminal: Multi-column/Table 'ls'

When running a fullscreen terminal, ls doesn't adapt to the current terminal width and supply me with multiple column-listings of items, it always provide a single column of directory items. Even ...
0
votes
0answers
31 views

Make synchronized folder with TFS in linux

I am using TFS every where on CentOS and I want to run a service to listen on directory modifying this directory represent TFS local folder and for every (add or modify) it mirroring to TFS I tried ...
0
votes
0answers
56 views

How to change definition of HERE DELIM in notepad++?

I am planning to document shell scripts with embedded Perl pod as explained here: http://bahut.alma.ch/2007/08/embedding-documentation-in-shell-script_16.html The problem is Notepad++ has a narrow ...
0
votes
0answers
61 views

Why does read's timeout break my console?

I have a script that is causing an issue, I've boiled it down to this; #/bin/bash read -t 1 -p 'Wanna continue?' less +F readTimeout.sh echo 'Wont get printed' The original script operated by ...
0
votes
0answers
46 views

Why can a non-root user not access Sublime soft link

I like using Sublime text as a VIM replacement i.e. opening from the terminal with an argument. I installed Sublime into /opt/sublime_text/ and within that is the executable I need. I then soft-linked ...
0
votes
0answers
140 views

Start X in fullscreen

I just installed Cygwin/X for the first time and found the documentation really lacking in noob-friendly details, it gives me command line options (like -fullscreen) but doesn't explain how to use ...
0
votes
0answers
112 views

Automated avconv recordings script

I'm currently recording video from my IP camera to disk by making use of avconv (ffmpeg). avconv -i rtsp://192.168.1.1/stream -c copy pool.mp4 This works great as my feeds are already h264, I ...
0
votes
0answers
62 views

How can my bash script inherit core limits from a C shell?

I'm using tcsh for my shell. I disable core dumps by running "limit core 0". Running a program that crashes from my shell, I can see that indeed no core dump is generated. Next I have a wrapper ...
0
votes
0answers
34 views

Set X11 to open scripts by default

I am really new to Mac as I don't own one. I have created a ruby script on windows that I like to open an a Mac. I would like to set X11 as default "program" to open scripts instead of the one ...
0
votes
0answers
46 views

How to close login shell (and children of that shell) after unclean SSH exit (e.g. closing PuTTY instance)

If PuTTY window is closed without explicitly ending the session, the login shell and subshells remain in the process tree (note the script.sh was running at the time SSH connection was dropped): user ...
0
votes
0answers
27 views

How do I determine whether a program other than bash is running in a different pane in tmux, and if so suspend it and return to the shell temporarily?

I am trying to write a bash script to script tmux and do things in every pane in my current window. That I have down, but I'd like to be able to know if another window is running the shell or if I'm ...
0
votes
0answers
95 views

automate drive mounting after Cisco AnyConnect client is connected

I have a request to write a bash script for clients to open VPN connection and automount remote drives. I am not sure how to approach it. I figured out I can use "vpncli.exe connect " to connect, but ...
0
votes
0answers
31 views

Checking to see if keycode is assigned in bashrc

I have recently added the following two lines to my .bashrc file: xmodmap -e "remove lock = Caps_Lock" xmodmap -e "keycode 66 = BackSpace" This remaps my caps lock key to delete every time I open a ...
0
votes
0answers
157 views

find files between dates and move to other directory

I have multiple logs file in one of the direcortories, was trying to move them monthly wise to another path. tried below script for the same. for Month in `seq -w 1 12`; do MLDAY=$(date -d ...
0
votes
0answers
49 views

Implement Roll-backing in bash script

I have implemented an Ubuntu package in which bash scripts are using. I followed these for making packages in Ubuntu. ...
0
votes
0answers
383 views

Why gnome-terminal does not show prompt in vnc running on a guest in kvm?

I use KVM to host vm (ubuntu). Then I started vnc4server on the vm. The content of ~/.vnc/xstartup is shown below. gnome-terminal in vnc does not show the prompt and doesn't accept any keyboard ...
0
votes
0answers
179 views

OSX : Find all zip and rar in a selected folder then unzip and unrar

I am in the process of cleaning a huge library of mangas (mostly -but not only- image files ). Each manga has a main folder containing the different volumes, sometimes in .zip, sometimes in .rar. ...
0
votes
0answers
81 views

Script bash start new process

Every time I run a bash script or a binary, it creates a new process and a messy display, the output text comes only when the process is done. I don't understand why it behaves this way, I would like ...
0
votes
0answers
26 views

IO performance over a period of time

We use AWS environment at our company and mainly we generate huge amount of data, and there are alot of I/O going on on several thousand files. A collegue is claiming that it looks like generating ...
0
votes
0answers
161 views

How can I customise grc (generic colouriser) with Homebrew?

I've installed grc through Homebrew on Mavericks. I can't quite understand the readme. What I want to do, for example, is have the terminal output colourise the number at the start of each line when I ...