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

learn more… | top users | synonyms

0
votes
0answers
98 views

Automaticly run xinit from rc.local as different user

I'm working on some tuning of my raspberry pi b+. So I decided that midori should start automaticly after autologin. With startx it works without problems, but X is still to ressource hungry. So I'll ...
0
votes
0answers
24 views

How to clean up output from `watch git gc`?

git gc updates the output as it runs, perhaps using backspaces, control characters, and/or curses. (I'm not an expert on this.) How can I modify my watch -n 60 git gc bash command so that the output ...
0
votes
0answers
47 views

busybox cp 'are the same file' when copying directories

I'm porting a bash script that worked on OS X to Windows+BusyBox. The first command is to create a new directory mkdir ../new_directory Then to copy all files from the current directory to a new ...
0
votes
0answers
23 views

Check for available command

When I execute the bash script with root user I receive the output it say iptables not exist. Why this happens only with root? for CMDAPP in "hash" "curl" "iptables" do if ! hash "$CMDAPP" ...
0
votes
0answers
30 views

Desktop Gone in Centos 6

I had a third party library created a ~ folder (a bug there), and I tried to delete it by "rm -rf ~". And apparently, it is a mistake -- my session got rebooted and then when I went back in, all the ...
0
votes
0answers
101 views

smbclient fails silently to copy file in bash script

I have the following script: #!/bin/sh BACKUP=/respaldoBD NOW=$(date +"%d_%m_%Y") SMBCLIENT="$(which smbclient)" DBS="zabbix" for db in $DBS do FILE="mysql_$db.$NOW.gz" echo $FILE PARM="prompt; ...
0
votes
0answers
24 views

Need to source bash_profile each time

I have get a server space that runs linux. A user is created for me. I have a bash_profile in my home directory and I set environment variables for JAVA_HOME and JAVA. When I access server through ...
0
votes
0answers
19 views

Abort Printing of Huge Amounts of Text in Terminal

This has happened to me in a variety of instances: Sometimes I accidentally copy/paste the wrong thing into vim, and then I have to wait around 10 minutes for it to print through all that text. I ...
0
votes
0answers
37 views

Writing a secure login script

I'm trying to write a secure login script to allow a user to have limited access to a server and change particular options. My method for doing so is via a python script executed by the users ...
0
votes
0answers
28 views

Do functions/aliases defined in a bash script that's downloaded from a server and executed not work?

I had a .bashrc which I moved to server so that I can download and execute it through wget. wget -O - http://xxx.github.io/dotfiles/bashrc | bash It does get executed but any functions and aliases ...
0
votes
0answers
25 views

how to detect availability of GUI

For Linux: I have a text mode installation (bash) script and a graphical mode setup program (a Free Pascal binary). I'd like to run the graphical setup when a GUI is available. How do I detect which ...
0
votes
0answers
39 views

xcode install doesn't work from mac teminal

So i'm trying to install the command line tool for xcode, i keep hearing to this xcode-select --install so I get the following output. xcode-select --install Usage: xcode-select -print-path ...
0
votes
0answers
165 views

open file from Cloud9's terminal (bash) in its IDE

What command would open a file in the default editor of Cloud9's IDE from within its own terminal bash shell? I tried xdg-open and gnome-open but those opens in emacs.
0
votes
0answers
73 views

How to setup an array to capture output from ffmpeg volumedetect command

If you query a media file using a command such as ffmpeg -i amediafile.mp4 -af "volumedetect" -f null /dev/null you get output including.... [Parsed_volumedetect_0 @ 0x181d0a0] n_samples: ...
0
votes
0answers
42 views

Command 'at' does not work in one Synology NAS, though it works perfectly on another

I have installed at command on 2 different NAS synology. On 1, it works perfectly, on the other I get the message: Villars1> echo "touch /tmp/tt" | at now next minute warning: commands will be ...
0
votes
0answers
77 views

Entered wrong .bash_profile and now my laptop is running hot

I am just learning how to use the command line and was editing the bash prompt setting in .bash_profile. I made an error in the prompt settings in .bash_profile and I lost the prompt and the ability ...
0
votes
0answers
22 views

pidof Xorg is not returning a number on my computer

I'm trying to debug a performance problem with Xorg on my computer and I found a curious problem doing the operf command: pidof -sx Xorg, or just pidof Xorg outputs nothing. But ps -e | grep Xorg ...
0
votes
0answers
71 views

Bash: move all files in all recursive folders to the root of the volume?

I have a disk with files and folders, a few levels deep. Eventually, there are mp3 files. What I would like to do is move *.mp3 from every level to the root of the disk, and then delete all the ...
0
votes
0answers
36 views

-t, -T and/or -t -t options for ssh are not stopping stty errors

I've googled this error (which is a pretty common error) ad nauseam, but none of the solutions are working. Disabling pseudo-tty allocation nor forcing pseudo-tty allocation work for me. I always ...
0
votes
0answers
43 views

curl won't shut up (--silent does nothing)

I'm writing a quick shell script, and I cannot for the life of me get curl to suppress the progress bar. The relevant line looks like this: curl http://website -o $temp >/dev/null 2>&1 ...
0
votes
0answers
53 views

GNU screen command on path not found

When I use GNU screen in the following way, it works: screen java -jar .... but why does screen bukkit .... not work when bukkit is a executable script from my path ($PATH)? I've read here, ...
0
votes
0answers
218 views

Wrong exit status from expect script

I developed the TELNET_TEST.expect (expect script ) in order to test TELENT connection on remote machine this script perform telnet on target machine wait for login and send password and make exit ...
0
votes
0answers
45 views

Bash script for repeated execution of benchmark

I'm working on a project involved with cloud instance performance. Currently running UnixBench on EC2 instances. For comparison purposes I require a benchmark to be run constantly on one instance. By ...
0
votes
0answers
67 views

CLI tools/ways for dynamically constructed DOM structure parsing HTML Javascript

I'm planning to make a tool which recognizes HTML using DOM structure in CLI. As many sites produce many DOM elements using JavaScript these days, it's becoming difficult to extract information from ...
0
votes
0answers
148 views

mc-wrapper does not exit to MC_PWD directory

I recently installed openSUSE 13.1 and set up the mc in typical why by aliasing mc with mc-wrapper.sh to have it exit into the last working directory in mc instance. However this does not seem to be ...
0
votes
0answers
118 views

Batch replace non-ASCII characters in filenames

I'm looking for a shell script that will recursively replace non-ASCI characters with underscore or just remove them. The issue is that a drive with files, created on Linux, has to be used on ...
0
votes
0answers
31 views

cygwin's chmod behaves as working, but it does not work

My Cygwin installation is behaving strangely: chmod does not work. [09:45 Administrator@DellIns14 ~] > ls -ls /usr/bin/chmod 64K -rwxr-xr-x 1 Administrator None 38K Feb 6 2012 /usr/bin/chmod ...
0
votes
0answers
27 views

Running Custom commands in a Terminal Application

I am running a terminal application in /dev/pts/X terminal that has its own console as sampleapp> what I need is to run commands specific to this application but from another terminal.
0
votes
0answers
79 views

How to query mssql db from bash on subsystem for unix

I have a script that is used to query a database and use the result set for further processing. This is a shell script that runs on bash. But the bash used is the one shipped in subsystem for Unix for ...
0
votes
0answers
183 views

-bash: java: command not found MacOS 10.7.5

I recently "uninstalled" Java 7 because it isn't compatible with Chrome, following the instructions on this site: https://www.java.com/en/download/help/mac_uninstall_java.xml. Then I re-enabled Java ...
0
votes
0answers
69 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
112 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
70 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
42 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
206 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
20 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
121 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
51 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
20 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
33 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
521 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
48 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
57 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
35 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
42 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
57 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
25 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
46 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
293 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
69 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 ...