The shell is unix's command-line interface. You can type commands in a shell interactively, or write scripts to automate tasks.

learn more… | top users | synonyms (1)

5
votes
1answer
108 views

Replace CD number in MP3 ID3 tag

I have a library of MP3 files where in some files the "CD number" tag (TPOS) contains "CDx" values, e.g. "CD1" or "CD2". The ID3 spec says that TPOS values shall be numerical strings. Processing these ...
2
votes
1answer
13 views

fstab does not mount cifs at startup

I'm using Cent OS 6.5. I have a cifs share which needs to be automatically mounted at the system reboot/startup. Following is the line from my /etc/fstab file : //192.168.1.2/files/ /users/ cifs ...
2
votes
1answer
350 views

Gnome + Linux: GUI apps don't inherit PATH from parent console apps

In Gnome, don't GUI applications inherit the PATH of the shell process that launches them? Apparently, GUI applications see only the PATH specified in ~/.profile. No issues with console applications, ...
2
votes
1answer
361 views

Xubuntu 12.04: slow login

I'm running Xubuntu 12.04, and after I ran the update, my login started slowing down big time. I've dabbled a little bit with the programs in Settings -> Settings Manager -> Session and Startup, and ...
2
votes
1answer
335 views

KSH styling text based menu using STDERR

Is it possible to format the STDERR in order to have a better looking menu using the select command? I have a simple select select oChoice in $(<tempMenu.menu) ; do case "$oChoice" in ...
1
vote
1answer
27 views

How to copy three files at once instead of one file at a time in bash shell scripting?

I am running my shell script on machineA which copies the files from machineB and machineC to machineA. If the file is not there in machineB, then it should be there in machineC for sure. So I will ...
1
vote
1answer
26 views

Pass login messages to tmux

When I login, I connect to a tmux session (either by exec'ing tmux if there is no current session, or exec'ing tmux attach if there is). However this means I don't see the login messages (/etc/issue, ...
1
vote
1answer
27 views

How can I add autocomplete for “gem which” with rbenv?

I am using rbenv on Mac OS X. I have autocomplete functionality already for the gem command: $ gem build environment lock query stale cert fetch ...
1
vote
1answer
52 views

Program acting differently depending on user

I am trying to control an RC transmitter from a PHP site. The command works fine as user "xbian" in the command line: sudo /home/xbian/433Utils/RPi_utils/codesend 34832404 for example, and it works ...
1
vote
1answer
53 views

Autocompletion and coloring not working, when using ssh in emacs shell

I'm connecting to remote server using emacs shell. Emacs shell displays directory listings with proper coloring and auto completion when working with local machine. But when I use ssh the ...
1
vote
1answer
85 views

How to safely move a file to another directory and remove duplicates

I want to move files from Downloads, Documents, Pictures, Music, et al to shared locations. This is for various reasons, including because I want to keep media in a central, shared place. I want to ...
1
vote
1answer
71 views

init-scripts in autoyast to autodeploy Suse Linux server

I'm deploying a base SLES11.1 server using autoyast. What I want to achieve is to install some packages on it after the deployment. So I use the init-script in the autoyast control file. Here is the ...
1
vote
1answer
108 views

How to give variable to a KSH script with a CGI?

index.sh is in the cgi-bin directory: #!/usr/bin/ksh echo 'Content-type: text/html <html><body> <form action=FOO.KSH method=POST> <input type=submit value=fgrep ...
1
vote
1answer
172 views

Different “history” command output after reconnecting via SSH

Why do I get different results for the "history" command for the same user after I reconnect a disconnected SSH session? I connect to a server using putty (SSH), say as root My network gets ...
1
vote
1answer
473 views

Deleting Non-empty Directory with smbclient

How can I remove a non-empty directory with smbclient? I have tried the following: 1) rm Result: NT_STATUS_NO_SUCH_FILE listing [dir_path] 2) recurse;rm Result: No Error but also nothing ...
1
vote
1answer
441 views

Can I use pmap to find out Memory utilization?

I want to measure memory utilization of my Apache Server. Can I use the pmap command and pass all the process IDs of httpd and take that as total utilization? pmap PID1 PID2 .... It seems that pmap ...
0
votes
1answer
41 views

Limiting grep search

Please help! Must use grep for this assignment. Must control grep function to search for a string strictly in a given field (Sadly no delimiters) Search field is characters 12-26. Must check if user ...
0
votes
1answer
61 views

set tab color in a tabbed terminal emulator

I would like to set in my terminal emulator (i.e. gnome-terminal) the color of the tabs like in the osx's terminal emulator. Is there this feature in any of the linux terminal emulator plethora? ...
0
votes
1answer
157 views

How to execute Netscaler commands through a remote machine via SSH connection

I have been trying to execute some NetScaler commands like "bind" & "unbind" through a Linux Box via an SSH Connection. Now the Problem is, Manually we are able to enter & execute commands on ...
0
votes
1answer
153 views

sh script will not execute as root (cron)

I have the following script added to cron. If I add touch thisisatest.file to the first line it will create a file named thisisatest.file, but not execute the rest of the code. If I manually type ...
0
votes
1answer
263 views

Why alias does not work in AIX (korn shell, .profile)?

I have these files in my home directory: drwxr-xr-x 3 meuser staff 256 Oct 12 13:11 . drwxr-xr-x 102 bin bin 4096 Sep 30 12:28 .. -rw------- 1 meuser staff ...
0
votes
1answer
121 views

Execute remote programs and completely detaching it

I need to execute a remote application (named ConnectionManager), which uses the ncurses library, on the remote server launching it from a local pc. ConnectionManager is a program wich use ncurses ...
0
votes
1answer
163 views

Moving Same files from different folders using shell script on AIX 5.4

There are two folders named Folder1 and Folder2. Folder1 has files with name:For example S-080001-0-0.xml with its corresponding same files in Folder2 named S-080001-0-0.xml The change in Folder2 is ...
0
votes
1answer
478 views

Converting update-rc.d redis_6379 defaults to chkconfig command

I'm trying to run the commmand below to Centos and of course I get command not found. How do I then convert it to chkconfig ? update-rc.d redis_6379 defaults
-1
votes
1answer
42 views

Remove directory without `rm -r`

How to remove non-empty directory without using rm -r or find -delete ? I think it is related to unlink, perl or inode
-1
votes
1answer
72 views

Script to search inside non-root and tmp directories

I have a script: egrep -R -s -c '([^0-9a-zA-Z_-]|^)(5[1-5][0-9]{2}( |-|)([0-9]{4})( |-|)([0-9]{4})( |-|)([0-9]{4}))([^0-9a-zA-Z_-]|$)' $searchpath | egrep '\:[^0]' > $logfilename It needs to be ...
2
votes
0answers
96 views

zsh: Echoing every statement?

I have an odd problem with zsh when I switch between shells in a particular way: Option 1 (works well): I start a zsh shell. I switch to tcsh with /bin/tcsh, and I switch back to zsh with /bin/zsh ...
2
votes
0answers
263 views

What happens when you background a function which calls another function?

Question says it all on the tin. Can someone explain to me what goes on here ? I'm trying to find out how to background a process in a script that calls another function and reliably terminate it when ...
1
vote
0answers
17 views

Execute commands on TMUX Detach

Is it possible to execute commands on tmux detach? I usually have a rails console and server running in the tmux session, on detach is it possible to automatically end those? Thanks.
1
vote
0answers
25 views

How to automatically launch a lxc container on ssh connection?

I'm attempting to setup a system that automatically creates a new sandbox on a ssh login to use as a temporary jump box into my server. So to do this I was wonder how to setup lxc to spin up a new ...
1
vote
0answers
45 views

Merge several files with maximum 1 line difference

Suppose I have the following files: file0.c: int b=NULL; int a=NULL; file1.c: int b; int a=NULL; file2.c: int b; int a=NULL; I am looking to merge the files file1 and file2 to generate the ...
1
vote
0answers
53 views

Segmentation fault with dialog

I'm getting a segmentation fault with the following script when it's more that one child dir past the pwd. The program kills with the error message and I have to reset the shell. For example: I start ...
1
vote
0answers
265 views

Using node.js and shelljs as interactive shell

Following the answer given at unix.stackexchange.com/questions/58011/is-there-a-javascript-shell That requires me to always execute var shell=require("/usr/local/lib/node_modules/shelljs"); It ...
1
vote
0answers
114 views

Serial Communication on DD-WRT stty config not sticking

I am attempting to control a serial device (in this case a projector) using a Fonera router with DD-WRT on it. I've got the serial port on the fonera wired through a level shifter and then into my ...
1
vote
0answers
160 views

gnome-terminal cmd leaving processes open after closing parent window

The following simple command should demonstrate my issue: gnome-terminal --tab -t "Tab 1" -e "/bin/bash" --tab -t "Tab 2" -e "/bin/bash" This should open a new window with two tabs and an active ...
1
vote
0answers
140 views

service command: Failed to issue method call

I downloaded the source of tinyproxy and then use ./configure make make install to install it Then I want to start it, but get errors, like the following: [root@kitty tinyproxy-1.8.3]# service ...
1
vote
0answers
49 views

add audio from playing file to microphone stream

I need to add a sound to what the microphone is capturing, is it possible? I started with man aplay and found that I can do aplay -D PCMdevice filepath.wav so then I listed the PCM devices with ...
1
vote
0answers
28 views

Make zkbd ignore $DISPLAY

Is it possible to make zkbd ignore $DISPLAY variable? I have set up when I log in to different X sessions and it is annoying if suddenly I need to reenter/copy configuration (and I have no idea why ...
1
vote
0answers
110 views

(KDE or X ) Script opens konsole in wrong virtual desktop

I have this script. I put it in ~/Desktop. I view the script on my desktop in a "Folder View" widget. When I click on the script, I get list of users, then I get an authorization dialog box ( for a ...
1
vote
0answers
354 views

Manually setting environment variables for Metasploit

How do I set manually environment variables for Metasploit, when I execute db_driver I get this message: [*] No Active Driver [*] Available: [*] DB Support: Enable the postgresql driver ...
0
votes
0answers
12 views

Convert rgba color value to a Terminal supported color

Randomly I will take the following example: rgba(122, 143, 186, 0.54) How can I convert this color to the closest Terminal supported color?
0
votes
0answers
40 views

usermod -L after creating the home dir

so I see from some questions here, to lock an account, create it, then lock, e.g. useradd -M lol;usermod -L lol However.. I do have a home dir, by eg. useradd -md /path/lol Question is.. to avoid ...
0
votes
0answers
123 views

Override LDAP login shell for a specific user in RHEL

How in RHEL do I specify /sbin/nologin shell to limit a user to SFTP access only when their shell is determined by their LDAP profile? chsh only works with passwd file users I believe.
0
votes
0answers
66 views

Application does not see environmental variables

I am running following 32 bit command on 64 bit system: LIBGL_DEBUG=verbose glxinfo32 -v -t | head -5 It's output says direct rendering: No (If you want to find out why, try setting ...
0
votes
0answers
106 views

Do all Debian-based distributions come with the same default .bashrc?

I ask this out of curiosity because while I have kept my system configuration files under version control for some time now, they've only ever been for OS X. Recently, though, I've been developing ...
0
votes
0answers
130 views

init-scripts in autoyast to autodeploy Suse Linux server

I'm deploying a base SLES11.1 server using autoyast. What I want to achieve is to install some packages on it after the deployment. So I use the init-script in the autoyast control file. Here is the ...
0
votes
0answers
235 views

Easy way to push data into MongoDB from Bash shell script?

I know you can create a Javascript file that the MongoDB shell will execute upon startup. But I'm hoping for something more "lightweight" than that. I am using a Linux program that has a scripting ...
0
votes
0answers
103 views

How do I make www-data run vim command (and find plugins)

I use the vimwiki plugin for note taking, and for those rare cases when I can't reach my home server over ssh, I use a simple html-form to update the textfiles. In vimwiki there is a command to export ...
0
votes
0answers
77 views

unexpected bash behaviour after console login (openSUSE)

I'm trying to install a Linux OS on the computer I use as a home server, because I liked "Raspbian" so much on my Raspberry Pi. I created a custom linux using openSUSE Studio, that's just text based ...
0
votes
0answers
225 views

python error using an executable with Z shell

I'm getting this error from the Unix Z shell (I'm on Mac): python: posix_spawn: /System/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python: No such file or ...