A shell is software that lets users interact with the operating system, usually by typing at a command-line.

learn more… | top users | synonyms

0
votes
1answer
17 views

Weird output in my mac iTerm bash shell. How do I make it clean?

Setting up my bash and made some mistake. Here is my bash shell: android-c26f663baae722eb:~ okyretina$ I have used a clean .bash_profile and sourced it and the shell still have that weird ...
2
votes
1answer
51 views

Default shell for running scripts (w/o shebang) in macos?

I have ZSH as default shell in MacOS, everything is working fine. ZSH is installed as brew package, Ive set default shell in my account, new shell is listed in /etc/shells... everything is set, like ...
0
votes
0answers
14 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
7 views

cygwin programs returning errorcode -1073741819 Windows 7 cmd

Sometime in the last week or so none of my cygwin programs are running from the cmd shell of Windows 7 64-bit. Tried rebooting and reinstalling fresh, but with same results. After further analysis, ...
2
votes
3answers
49 views

Why is this sudo command try to run in /root?

I try to run a sudo command via SSH like this: ssh domain.com sudo -u user bash -c "cd /home/user/ && ls" (which is obiously just an example). I get back: /home/user/: line 0: cd: /root: ...
0
votes
1answer
19 views

How to get when run `top` command ports listed?

How to get when run top command ports listed ? I get info about process but I need port to see ( process dies very quickly , 0 seconds, and I cannot grep after ps aux ). Is possible to top command ...
0
votes
1answer
9 views

concurrent scheduled jobs and ora-27477

Need: To have Oracle kick off a shell script that performs processing on tables and data in the Oracle database. The script is instantiated by specific activity from web clients. Issue: Web clients ...
0
votes
2answers
39 views

is there anyway to get remote shell from windows to windows over WAN? [duplicate]

Is there any way to get remote shell (not RDP) from home PC to office PC? i have 2 pc's on 2 different places pc number one ip : 66.33.22.885 ( home PC ) pc number tow ip : 77.13.85.676 ( office PC ...
0
votes
0answers
11 views

How to batch download wikipedia pages as pdf?

I have a list of wikipedia pages that I'd like to keep updated in pdf format. What would be the easiest way to do this? The ideal workflow for me would be something that I can put into a shell or ...
0
votes
5answers
29 views

History in bashrc on login vs manual sourcing - clearing and loading

I use a bunch of different aix machines at work and need to share users with co-workers. To make my life easier but not bother others with my customizations, I have created a .bashrc file that I copy ...
1
vote
1answer
18 views

Hide all output from a background process

I have a bunch of commands in my zshrc which invoke another command in the background. The background command is an alias to a text-to-speech program (I use it to give me audio cues when processes ...
0
votes
1answer
26 views

Memory usage of a process in a shell script

I want to find out the memory usage of a process in a shell script.I tried to use this piece of code : while[process] do if [ -e /proc/$pidno/statm ]; then m=`awk '{OFS="\t";print ...
1
vote
1answer
16 views

How to extract certain database from full Mysql dump?

I have regular backups of my mysql server.For convenience I set it up as a single Mysql nightly dump. Now I need to restore one of the databases from the dump. How do I restore a single database ...
1
vote
1answer
21 views

ZSH Cull Old Aliases

When I call alias in a zsh shell, I get a list of aliases. Some of them are desired, some are not. I originally created a .alias file in my home directory, and added source $HOME/.alias to my .zshrc. ...
0
votes
2answers
43 views

Linux zip and exclude directory in Bash script

I am trying to write a bash/shell script to zip up a specific folder and ignore certain sub-dirs in that folder. This is the folder I am trying to zip "sync_test5": My bash script generates an ...
2
votes
3answers
40 views

In a Linux shell, why does backslash-newline not introduce whitespace?

When using the Linux shell, I come across the following situation: $ A=B\ > C $ echo $A BC In my mind, when the newline encountering escape character, it can not be a CR character but it still ...
0
votes
1answer
24 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
20 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 ...
1
vote
4answers
59 views

How to get first line of output from command line?

I'm running a find command that's returning multiple results, but I only need the first result. A bit of googling led me to the "read" command, but I couldn't figure it out, and the man page didn't ...
0
votes
0answers
19 views

ffmpeg - how to see what scaling algorithm is used

I'm upscaling a 200x200 video to 400x400 using the -sws_flags scaling option to set the scaling algorithm. Now, I can't tell by the console output if some algorithm was used, neither by the looks of ...
1
vote
1answer
26 views

alias not working with my mongo --eval command

I have the following mongo shell command to delete all users that aren't admins mongo --eval 'db.users.remove({group:{$ne:"admin"}})' collection This works. I want to create an alias for this ...
0
votes
0answers
6 views

Different low uplink machines hold the same data, how to speed up rsync to machine with faster connection?

Two different machines hold the same data (10G+), both with relatively slow upload. I want to transfer the data to a machine that can receive with a much faster speed. Now to speed up transfer of ...
0
votes
1answer
24 views

shellinabox - How can I restrict access to certain users only?

I've got a Ubuntu 14.04 machine which I've set up with shellinabox. Now I would like to restrict access to shellinabox to only a certain user account. Nobody else should be able to log in with it. ...
1
vote
2answers
32 views

Choose which binary is default binary on Mac OS X Mavericks

I have installed the latest SVN 1.8 via homebrew on my Mac. However now If I run svn --version I get back that I have 1.7. Next thinng I run which -a svn which then shows me I have it twice: ...
0
votes
1answer
20 views

How can I move a specific folder if there is a file with the same name in bash script?

I'm trying to write a shell script that finds a specific file and moves it to a folder. #!/bin/sh echo -n "/home/cosmoretro/movie/" read text2 while : do echo -n "Ara:" ...
0
votes
2answers
33 views

Renaming files from a list of filenames

I'm still very new to shell scripting so I'm sure this command is all kinds of wrong. I am trying to rename a folder of files to the names in a txt file. The precondition is that the filenames.txt and ...
1
vote
2answers
45 views

What is the meaning of “var=${str=expr}” in linux shell?

What is the meaning of "var=${str=expr}" in linux shell? Who can explain it for me specifically?
1
vote
0answers
15 views

Better line breaking in terminal?

I am not sure if my request is valid, doable or better than the default option, but I'll give it a shot anyway. Word-wrapping in a terminal usually bothers me, since it wraps in the middle of the ...
0
votes
1answer
27 views

compare 2 arrays eg. csv

i would like to know if it is possible to compare 2 list via shell. The setup: List "A" with about 6000 entries List "B" with about 300 entries Is it possible to detect wich are duplicate and wich ...
0
votes
0answers
16 views

path setting appears twice in env output

After an OS version upgrade I have the following strange problem: % port MacPorts 2.3.1 ... % sudo -i # port MacPorts 2.3.1 % sudo port sudo: port: command not found Furthermore, if I do it all ...
0
votes
2answers
47 views

Crazy terminal behavior

I am trying to run a script to rip all the audio from a bunch of MP4 files. Everything works when I do it line by line cutting and pasting from my text editor into terminal, but when I create a shell ...
5
votes
1answer
57 views

Why there is an empty line begin with “*” in the result of history command on linux?

Today at work, I wanna know a history command which I am not very familiar with and I was sure that I just executed a little while ago. However, when I ran history on the same terminal window, I found ...
0
votes
1answer
24 views

Tried Installing ZSH through cygwin and then trying to use zsh through Cmder

I tried to install Cygwin (64 bit version) on my computer, and it went through hunky-dory until at the very end, autorebase.bat failed with exit code 1. I read through the logs and they weren't too ...
0
votes
1answer
14 views

psql ignores my PAGER variable

I want to use less as my default pager. Therefore I have PAGER=less in my .bashrc. It's sourced properly: $ echo $PAGER less However, psql still uses more if I call it with psql. BUT: If I call it ...
0
votes
1answer
14 views

exiting current terminal in a script

I have made alias for running certain program and i have put it in .bashrc file. I want to close current terminal inside the script. I've tried this but it is not working. alias mp='java -jar ...
-2
votes
1answer
33 views

how to run command in another terminal in Linux script

In Linux shell script I have to run few commands under another user but I am enable to. Please advice some suggestions. $ jumpto -T -u ... after this command it enters in another terminal and I ...
1
vote
4answers
51 views

How to rename a lot of files in bash shell?

Sorry for the question. I searched the internet a lot, but couldn't find an answer which worked (though there were a lot of suggestions). So, I want to rename A LOT of files. Writing all file names ...
0
votes
1answer
28 views

Small bootable package to enable ssh client?

I've been trying to find the smallest possible package to put on a cd/thumbdrive that will allow me to use an ssh client on a wired networked computer. I'm talking about really barebones stuff, no ...
0
votes
1answer
33 views

stop all child processes when 1 of then returned exit code 1

I have 2 or more build processes to run in background. I want to stop all the build processes if one of them exit with code other than 0. ./build-1.sh & ./build-2.sh & ./build-3.sh & wait ...
0
votes
0answers
20 views

Access script arguments from within script [duplicate]

I have a script that I can run like this: bash myscript.sh -ram 4096M -jar something.jar -dir /home/something I would like to be able to access the variable ram, jar, and dir from within the script. ...
0
votes
1answer
35 views

CentOS 6 - Send user defined command from PHP

I have a web control panel and I need my allow my users to send commands to their application. I a similar problem to SQL injection. $user_input='good command'; shell_exec('tmux send-keys session1:0 ...
1
vote
1answer
40 views

Batch convert txt file encoding

I have about 700 files that were the results of a closed caption software process. I can open the files on my PC or Mac in a GUI, but when I open it on the server with nano, I get this: ...
0
votes
3answers
46 views

Starting programm into window manager

Is there a way to start a program from a terminal, that is not a "child" of the window manager (p.e. XFCE), into a window manager? The executed program has to be detached form the terminal (and my ...
1
vote
1answer
30 views

Different globbing behavior with same shopts?

I have multiple shells (bash) open on the same machine, and in one of them, globbing seems to have stopped. ls * gives ls: *: No such file or directory, and so on. I figured that I must have set some ...
0
votes
0answers
16 views

Apply new Windows shell context menu item to encrypted files

I am trying to add a context menu item which will only appear if a file is marked as being encrypted. With an AppliesTo entry, I can successfully apply the menu item to only text files with ...
0
votes
0answers
18 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
2answers
70 views

Is it possible for a root user to watch others' shell session secretly in live?

I see a similar question on stackoverflow: http://stackoverflow.com/questions/1353253/linux-terminal-how-to-capture-or-watch-other-terminal-session Someone recommends conspy. However, it seems that ...
0
votes
1answer
29 views

Bash doesn't source file unless manually started

bash won't source files from an login terminal unless I manually run bash from a terminal, I have bash (and not sh or dash). When I source a file, it returs errors (like "syntax error near unexpected ...
-1
votes
1answer
16 views

Record directory sizes on shutdown

What would be the easiest way to record and store the sizes(and a timestamp) of a few chosen directories upon each shutdown - say in a .csv file.
1
vote
1answer
30 views

Using fdisk -r to read disk in Solaris

Upon reading the fdisk's man page on Solaris, I came across the -r flag: -r Read from disk and write to stdout. See -o and -s, which specify the starting point and size of operation. Using ...