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

learn more… | top users | synonyms

0
votes
0answers
35 views

GZIP corruption with big files?

I came across a weird behavior: gzip v1.5 - Fedora r18 A file -rwxrwxrwx. 1 root root 3892576256 Apr 28 11:29 vm.qcow2 Initial checksum: md5sum vm.qow2 954c5461468d68daed3cef6a7b66bd8f vm.qcow2 ...
0
votes
0answers
53 views

Specific command not recognized in only one shell

I'm running Windows7 as OS as my development machine. It has various Shells: cmd Powershell Mysysgit GNU Bash <-- this is the one not working PuppetLabs Shell Nodejs Shell PHPStorm built in ...
0
votes
0answers
18 views

Look for app/cache and app/logs directory and apply rules in /var/www/html

I need some help creating some bash script that help me on my development server by running this commands: HTTPDUSER=`ps aux | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | ...
0
votes
0answers
13 views

Run a service action with a file from a shell script

I use CloudApp and it has installed a handy service called “Upload to CloudApp”. I'm writing a build script that I want to hook into this service. Every time it is run I want it to upload the file ...
0
votes
0answers
121 views

FFmpeg/Avconv: Scaling Filter “Error when evaluating the expression”

I'm trying to scale a video with FFmpeg with the following command: ffmpeg -i input.jpg -vf scale="'if(gt(a,4/3),320,-1)':'if(gt(a,4/3),-1,240)'" output_320x240_boxed.png This is taken verbatim ...
0
votes
0answers
70 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
24 views

Unbuffer swallows the exit status of killed process

The expect "unbuffer" command seems to swallow the exit status of its child if the process is killed. Is there something that can be done to stop this behavior? It does not swallow the exit status if ...
0
votes
0answers
47 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
23 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
8 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
81 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
108 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
37 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
36 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
26 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
234 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
34 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
36 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
33 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
39 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
27 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
140 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
14 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
31 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
56 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
44 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
61 views

Tmux causeing issues with Bash up-arrow

When using tmux, I have issues of ghost characters when using the Up and Down arrow keys in Bash. If I press UpArrow a few times and then press DownArrow a few times, then the first few characters of ...
0
votes
0answers
74 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
29 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
63 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
17 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
43 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
41 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
38 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
89 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
34 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
49 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
42 views

How to restore virtual host configuration on Mac OSX

I successfully created some virtual hosts on my machine a while ago by modifying my /etc/hosts file and my http-vhosts.conf file. Then I found a very handy tool called virtualhost.sh ...
0
votes
0answers
79 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
25 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
47 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
45 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
40 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
106 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
78 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
51 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
29 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
38 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
84 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 ...