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

learn more… | top users | synonyms

0
votes
0answers
26 views

Bash Script Display Remote Screen Session to User

I'm kind of new to bash scripting and I'm having trouble figuring out how to accomplish this. I'm working on a script that is designed to backup and manage a java application that runs within a ...
0
votes
0answers
30 views

Open pwd protected http stream in vlc from Linux CLI

Can anyone please advise me on how to open a pwd protected http stream from CLI in vlc? I checked out the --help and man pages, but they seem to offer only syntax for opening ftp, rmt and smb pwd ...
0
votes
0answers
17 views

How to run an script using cron in Windows 7 using cygwin?

I have installed all the dependencies in cron. My scripts are working properly, and also I have tested cron which I think works properly as well. However, I would like to set up a task to run a script ...
0
votes
0answers
25 views

running programs from MSYS with quotes

I'm trying to execute non-MSYS program from within MSYS. But MSYS (bash) doesn't work as expected. I'm running commands and see what procmon has to say about command line passed: >cmd /c ""cmd" /c ...
0
votes
0answers
35 views

OpenWRT wget in background

I start first script /etc/rc.local : sh /root/script1.sh & In file /root/script1.sh I connect by wget to server (while for tries) And after it I run : # say hello tries=1 while [ 1 ]; do ...
0
votes
0answers
12 views

sac2xy not executable on terminal osx 10.9

file sac2xy sac2xy: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, not stripped ls -l sac2xy -rwxrwxrwx 1 ravi staff 50334 ...
0
votes
0answers
27 views

cron job monitoring script

greeting of the day!!! please help me a situation, i am trying to develop a script which provides me details which my cron job is commented or stopped which job is running or scheduled. like we ...
0
votes
0answers
21 views

How to detect the OS type of a SSH client from the remote OS

If I am using PuTTY from Windows to SSH to a remote OS, how do I detect what OS the SSH client is running on, from within the remote OS? I think this is probably impossible. Merely the terminal type ...
0
votes
0answers
12 views

How to prevent MacVim from inherenting .profile as if it was Bash itself?

I have this guard in my .profile: if [ -n "$BASH_VERSION" ]; then if [ -f "$HOME/.bashrc" ]; then . "$HOME/.bashrc" fi if [ -f "$HOME/.bash_aliases" ]; then . ...
0
votes
0answers
25 views

how to use “script” command automatically in Linux

How to run the script command in redhat automatically at the time of login and stop at the time of logout?
0
votes
0answers
82 views

FFmpeg unable to find a suitable output format when run from script

I'm trying to write bash script, which I can use to start encode of my video for web player, and also log to file when it started / finished. It looks like this: #!/bin/bash ...
0
votes
0answers
12 views

How to have zpaq extract files to stdout

I have some log files compressed with ZPAQ that I do not want to extract to disk every time I need to go grep-ing for events. Would like to extact to stdout so I can handle the output the same way as ...
0
votes
0answers
22 views

How to run --args AFTER Google Chrome is already open

How do run --args after Google chrome is already open? open -a Google\ Chrome --args --"profile-directory"="Profile 1" ONLY works when Google chrome is not running and I would like to know how to ...
0
votes
0answers
18 views

Make a script identify DBUS session address and use it

I'm using cron with notify-send to display some notifications, but it requires DBUS session to run Here is the script: export DBUS_SESSION_BUS_ADDRESS=[session] #!/bin/sh { DISPLAY=:0 ...
0
votes
0answers
23 views

Start terminator terminal in a free spot on my screen

When I start the default Ubuntu terminal, it automatically puts the new terminal in a spot on the screen where no other terminals are there. Now I set terminator as my default terminal. But whenever ...
0
votes
0answers
9 views

Meta keybindings for bash readline from .inputrc not working

If I put "\M-p": previous-history into my .inputrc and fire up a terminal (urxvt or xterm), hitting Alt-p prints a ":" character. Subsequent hits produce ^[p like so: :^[p^[p^[p^[p^[p I would ...
0
votes
0answers
24 views

ls inside bash script didn't found just created file

bash script contains like: ./java_application ls logs/app.log java_application deletes and creates new log file: app.log when I run this bash script I receive: ls: logs/app.log No such file or ...
0
votes
0answers
33 views

Why is there a bash process running in my Terminal if I use Zsh?

When I run the "top" command on OSX Mavericks, a bash process appears even though I am using Zsh, why?
0
votes
0answers
23 views

Logging/debugging the bash startup process

My bash shell sometimes takes quite a while to start, probably due to a lot of stuff happening in my various dot files (e.g. .bash_profile, etc.). Is there any way to properly log the bash startup ...
0
votes
0answers
37 views

Detaching from a GNU Screen suddenly clears the terminal

I feel so stupid for asking this, but here goes: I updated my Ubuntu (Server) install today from 13.10 to 14.04. Before the upgrade detaching from screen did not clear the terminal and now it does. ...
0
votes
0answers
22 views

Warning: the connection is closed, while running cron job

I have found on the Internet simple script to download wallpaper from bing and set it. #!/bin/bash # export DBUS_SESSION_BUS_ADDRESS environment variable useful when the script is set as a cron job ...
0
votes
0answers
47 views

How to parse pipe with multiple commands independently?

How can I parse output of a single command by multiple commands without truncating at each step? For example ls -al|grep -i something will pass every line that has "something" in it to the next ...
0
votes
0answers
99 views

OSX OSX Mavericks: Cannot login: Corrupt password file: Recovery mode bash not working for resetpassword script

Running OSX Mavericks on Macbook Air SDD disk. The system has corrupted the password file so none of my six identities can log in - password invalid. Following discussions and tests with apple ...
0
votes
0answers
43 views

Can’t set color of vim

I've asked same question to stackoverflow but It evaluated offtopic at stackoverflow. http://stackoverflow.com/questions/23667728/cant-set-color-of-vim?noredirect=1#comment36357524_23667728 If it ...
0
votes
0answers
39 views

Bash Prompt : incorrect time displayed

Using the following prompt: export PS1="\n[$(date +%d-%m-%Y)] \u@\h [\t]\n{\w} [\!] # " and with TZ to my timezone : echo $TZ = America/Montreal The time on the prompt is OK at the start of a ...
0
votes
0answers
24 views

How to rewrite bash shell script to nyaos script

I'm using this small shell script named zip0 in linux environment. #!/bin/bash zip -0rq "${1}.zip" "./$1"; I also want to use this function in windows nyaos script. By direct input from shell $ ...
0
votes
0answers
124 views

Local echo using Screen to connect to a serial terminal

Reading through the book "Building Wireless Sensor Networks" I learned that you can use the Screen utility to attach to a serial console. I tried using it to connect to an XBee module and it seemed ...
0
votes
0answers
35 views

File or folder not found error, but the file exists

I downloaded the android ADT bundle for Linux(my distro is Elementary OS), and after I unzipped it, I opened the folder sdk/platform-tools on terminal, and tried running the adb file. When running the ...
0
votes
0answers
35 views

How to open a local file with a query string appended to it in the default browser?

I want to do something like this from a shell script: $ open 'foo.html?foo=bar' Sadly that fails, as it looks for a file named foo.html?foo=bar instead of foo.html before opening the browser: The ...
0
votes
0answers
18 views

Cygwin broke something when trying to install new software

I was trying to install some OpenGL libraries and something strange happened so I stopped the update. Now, when I use cygwin, ls doesn't work and whenever I open up a new terminal window I get my ...
0
votes
0answers
61 views

Linux Mint 16 32-bit (Ubuntu) forgets password, even after resetting via grub/bash trick

I just installed LM16 using a live USB stick. Install went fine, and at the user step I made a password but chose 'log in automatically'. On first boot without the usb stick, it logged in without ...
0
votes
0answers
95 views

Getting a batch file to run windows 7 psr tool

I'm trying to run the Windows 7 problem steps recorder tool on a remote computer using screenconnect. Screenconnect allows you to quick launch files remotely, so I'm using batch files. The goal is to ...
0
votes
0answers
28 views

Connecting to ssh and using screen not working properly

I used once ssh -t <login@server> screen -R to connect to a server and everything worked fine. I used the terminal in the server to execute an script and then detach the screen. I came back ...
0
votes
0answers
45 views

Autoexport bash internal variables

I need to access to some bash internal variables (BASH_LINENO, BASH_SOURCE) from a command invoked by a shell script. The only possible interface between my command and the script are environment ...
0
votes
0answers
53 views

Bash History Under OS X (Mavericks)

Why does my bash history under OS X never seem to persist for more than an hour or two (or a day, at most)?
0
votes
0answers
33 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
42 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
15 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
93 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
60 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
20 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
41 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
22 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
54 views

How can I get Homebrew and MAMP (Pro) to play nicely together?

I am using MAMP Pro for most of my local application development and am trying to install ruby , etc via homebrew however homebrew will give me the following warning: Warning: "config" scripts exist ...
0
votes
0answers
61 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
78 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
36 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
33 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 ...