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
0answers
16 views

Linux Command to set TCP window size [on hold]

I want to send TCP packet with window size 65535 (0xffff). I m looking to set the TCP window size to 65535 on my linux system. I know that there is the sysctl command but I could not find how ...
0
votes
0answers
7 views

shell script to change bootloader background

I'm trying to create a shell script on openSUSE to change the bootloader background from the files /etc/default/grub line: GRUB_BACKGROUND=/boot/grub2/themes/openSUSE/background.png with the new ...
2
votes
2answers
25 views

How can I find what a Windows PC thinks its name is, given its IP?

How can I find out what a remote Windows PC thinks its host name is, given its IP? From Windows cmd.exe or a Linux shell. I'm not interested what a DNS server thinks the host name is for an IP, just ...
4
votes
2answers
55 views

How can I issue a command on my local machine from within an SSH session?

Example use case: I am working on my laptop running Mac OS X (A) and am logged into my development server (B) via SSH. I have a script which will generate a GitHub URL for the file/branch I ...
0
votes
0answers
10 views

Execute a .sh file from the desktop in intervalls

We've got a bad hoster, that only allows cronjob in 15 min. intervals. However sometimes we get time critical stuff and we need to do it in faster intervals. That said, the hoster allows an execution ...
1
vote
2answers
27 views

How to make Zsh not store failed command

Problem I'm using oh-my-zsh and Antigen to manage my Zsh. Sometimes I will accidentally enter a wrong/failed command into Zsh and it is very annoying when the zsh-autosuggestions plugin throws up ...
2
votes
1answer
115 views

How to make a bash script that names files with today's date

I'm trying to make a script to back up my we servers, but I have very limited knowledge with bash scripting. I want the script to name the backup file ht-"today's date". How would I go about doing ...
0
votes
2answers
32 views

How to echo string of another string shell variable

We would like to echo the value of a shell variable which has another variable string in its variable name. eg: we want the following output var1=1 var2=2 We tried several various forms similar to ...
0
votes
0answers
9 views

How to disable (and re-enable) notifications on GNOME Shell version 3.8.4 from the command line?

I am running Centos 7 with GNOME-Shell 3.8.4. I can happily disable all notifications from the top-right menu, as pictured: I need to do that from the command line, though, because I need to ...
0
votes
0answers
2 views

Running a slideshow on Ubuntu and and nfs

Seen this question and answer. I need to run a slideshow whose images are hosted on an nfs. Would this snippet of code while true ; do for i in * ; do cp "$i" ~/slideshow.jpg ; echo $i ; sleep 5 ; ...
1
vote
1answer
17 views

Can't find the good Cygwin shell executable

I am working on Windows 7 and I need Cygwin for my project. I am trying to launch the Cygwin terminal from a Java programm and then write command lines but my problem is that I can't find the right ...
1
vote
1answer
19 views

Windows 7 system resource as folder name

I hope it is not a stupid question, but is it possible to set a folder name to a system32.dll localised string resource? I can set the icon easily on the properties window (eg. from imageres.dll), but ...
0
votes
1answer
17 views

Remove a specific string common in multiple lines in a CSV file using shell script

I have a CSV file which contains 65000 lines (size approximately 28 MB). On each of the lines they have a path in the beginning in the format of: c:\abc\bcd\def\123\456. Now let's say the path ...
0
votes
1answer
12 views

Redirect stderr to second terminal / tty

I've tried things like rse to differentiate standard-output and standard-error streams from a program; but I'd really like the option of viewing the two in separate terminals, without redirecting to a ...
11
votes
4answers
1k views

Who deals with the star * in echo *

Who deals (interprets) the * in echo * Does the echo see the star or the shell take care about it and return a list of filename .. What about cp temp temp*
1
vote
1answer
17 views

Some characters in zsh don't show until the key is released

When inputting specific characters in zsh shell (in my case e and ;) they don't show up immediately after pressing the key. Instead they only show up a short time after releasing the key. When these ...
0
votes
1answer
21 views

How to use custom shell on windows 7 when connected remotely via thin client

We have a Win 7 PC that runs software within a custom shell. This shell blocks users from the operating system depending on who is logged in. When no one is logged on, the OS is inaccessible. This ...
0
votes
0answers
18 views

Multiple replace - using sed or awk

I have a code snippet like below CREATE TABLE TABLE1( ID integer NOT NULL, ROW_CREATED varchar (26) NULL, BATCH_LOG_ID integer NULL, TRANSACTION_TYPE varchar(5) NULL, PARTITION_COL integer ...
0
votes
4answers
52 views

While loop Bash script that outputs how many users use a certain shell

So I am stuck on trying to create a bash script while loop function that takes the input from /etc/passwd and outputs how many of users use bash, nolongin, csh, and ksh. I believe I am supposed to ...
1
vote
1answer
20 views

The application “SomeApp.app” can’t be opened

Problem: after downloading an application in OS X Yosemite (10.10.x) trying to open the application (either from the command-line or by double-clicking the application) produces an "The application ...
2
votes
0answers
16 views

Can one start shell from save file dialog

Using ubuntu. If one tries to print to a file, the save dialog opens. Is there a way one can execute the shell (or terminal) from the save file dialog file name entry box?
1
vote
1answer
12 views

shell: “can't shift that many” error

The following script works fine in one of my machines, printing 1 then 2: #!/bin/sh echo "1" shift echo "2" On another machine, however, it produces the following output: 1 ./script.sh: 4: shift: ...
0
votes
1answer
14 views

Unix/linux shell scripting floating point division

I have to divide two floating point values and store it in variable. My code below v_missedvol=4003.03 v_allvolume=3003.03 v_vol_temp= $(echo "$v_missedvol / $v_allvolume" | bc -l ) the result ...
1
vote
0answers
17 views

monitor command outputs in separate windows within a terminal

For a list of input text, I want to execute a repetitive command using each element from the list. In addition I also need to monitor the results of each of these commands in parallel. So I am looking ...
0
votes
1answer
30 views

How to run a script on ssh login and run another script after the first terminates?

I'm trying to run a script/shell just after I login via ssh to my host with a "guestUser" the mission of this user is to connect to another remote host via ssh, I've created this user on my host: ...
0
votes
1answer
37 views

How can something like the “passwd” file contain a shell?

I was doing some reading, and in Jon Erickson’s “Hacking, 2nd Edition: The Art of Exploitation” on page 89 I read that: passwd file contains account information for every user on the system, ...
0
votes
1answer
27 views

Output of the ps command and understanding the flags

Ubuntu 12.04 LTS using bash. I tried running the ps command from a Java program using the Runtime and got some unexpected output. Upon closer inspection I realized that it was the output of: ps ...
2
votes
2answers
35 views

Setting the variable $USERNAME has no effect

Setting the variable USERNAME has no effect. Accessing the variable always returns the current logged in user. james@localhost:~$ USERNAME=foo james@localhost:~$ echo $USERNAME james I could not ...
0
votes
1answer
20 views

How to create a command shortcut in BASH or ZSHRC shells?

I know how to create an alias or a PATH however those are both used to navigate folders. How would you create a shortcut to say quickly type the following commands every time? alog = tail -f ...
0
votes
1answer
26 views

How to “sort” .torrent files by tracker?

I have a directory with a lot of .torrent files, and I want to get only the one with specific tracker(s). Is there a way to find them? The only way I've found so far is to add them all in a ...
0
votes
1answer
24 views

Get the Group name which has GID=0

I wanted to write a shell script in which it needs to give the group name whose GID=0.I used awk command like this, awk -F ':' {$3==0} /etc/group | cut -d ':' -f1 It works fine in redhat,aix.But ...
1
vote
2answers
30 views

ZSH PS1 adding spacing when tabbing

I'm having an issue with zsh/oh-my-zsh with my custom PS1 prompt (that I brought across from bash). When I use the built-in zsh/oh-my-zsh prompt and tab for auto-completion, this works as expected. ...
7
votes
7answers
629 views

Remove linux file named with set of shell responsive characters

I've created a file named \;:$"\' to test a software of mine. I ended up with an error because I cannot delete the file property. I'm trying to find a precise char combination to remove via rm, but I ...
0
votes
0answers
16 views

shell script to generate a log file for VM Backups

we are using PHD virtual backup to trigger backups for VMs and now i want to generate a report of all VMs in a file consisting of VM Name, Date and Backup Time and mail it to my ID at particular ...
0
votes
1answer
41 views

Remote SSH Commands - bash bind warning: line editing not enabled

I am using bash 4.3.11(1) and have the following history plugin installed (via .bash_it): # enter a few characters and press UpArrow/DownArrow # to search backwards/forwards through the history bind ...
2
votes
1answer
91 views

What is the scope of “exported” in Unix shell variables?

I have set some environment variables in the following way: MY_VAR='helloworld' export MY_VAR Then I have switched to another user via su SOME_OTHER_USER I echo the MY_VAR variable.. and I see ...
1
vote
1answer
10 views

Why is the exec command used for file descriptor redirection?

In UNIX shells like Bash and Korn shell exec is used for two specific uses. Its use to replace the current program with another, as in exec prog is understandable. The name exec is a contraction ...
2
votes
2answers
33 views

Set urxvt shell without chsh?

I want to use bash as my default shell (so that it's simpler in tty) but I want to use zsh when I'm in X using urxvt. Is there a way to do this?
0
votes
3answers
26 views

How do I move files from many child directories into my root directory?

I'm using bash on Mac 10.9.5. I have PDF files in many directories, all one level from the root ... Dir_1/abc.PDF Dir_2/def.PDF Dir_3/ghi.PDF Dir_3/jkl.PDF ... How do I write a shell command to ...
1
vote
0answers
28 views

Port forwarding between two different networks [closed]

I have three Linux computers - A, B, and C. I have a TCP server that runs on C. B and C share same network and B and A share the same network. I want to send commands (and receive results) from A to ...
0
votes
1answer
17 views

how to add all the integers between two lines with a pattern and print

I have an input file (sample.txt) Sat 02/28/2015__19:32:37.63 262,404 K 100,964 K 112,052 K 124,628 K Sat 02/28/2015__19:37:38.41 262,408 K 100,964 K 112,056 K Sun ...
0
votes
1answer
10 views

What is KNOPPIX shell's start-up file?

I'm trying to install virtualenvwrapper and I got to change the settings of my shell's start-up file (like .bashrc, .zhrc, .profile, etc) to write this: export WORKON_HOME=$HOME/.virtualenvs export ...
1
vote
0answers
18 views

How to show git branch in Emacs shell

How can I show the current git branch as part of the Emacs shell prompt? For example, I have this in my ~/.bash_profile (I'm on Mac OSX 10.9 Terminal): parse_git_branch() { git branch 2> ...
2
votes
4answers
95 views

Prevent cat from opening a binary file

Is there a way to prevent or prompt you when trying to cat binary files? Oftentimes I need to work with log files or data files, some of which are text and others not. It's easy to get mixed up, and ...
4
votes
2answers
93 views

ssh without using the user's default shell

There was a vote to close this as "unclear what you're asking". Apparently being thorough isn't a good thing, so I'll be terse: When you SSH to a remote host: is it possible to execute a program ...
0
votes
0answers
12 views

Wget which stops when it has a download limit

I have over 200 wget in screens on my server. I set a download limit in each low wget: --limit-rate=1K. The only problem is that after one hundred seconds, he considers as a finished one, so this ...
2
votes
2answers
74 views

What is the equivalent of root in Windows 8.1, and how can I open a shell in that context? [duplicate]

I've heard the equivalent of root is the "SYSTEM" account. But I used a tool called "RunAsSystem" to open a shell as SYSTEM, and I'm still getting "access denied" errors even though I know the files ...
1
vote
0answers
20 views

Starting Zsh in ConEmu in specified directory

ConEmu runs zsh under CygWin fine. I want to add a right click option to explorer to "Start ConEmu With CygWin Zsh In This Diretory" ConEmu provides an Integration settings page to set explorer ...
0
votes
1answer
29 views

Mac OS X seems to be unable to find directry that certainly exists

For some reason Mac OS X cannot find a directory I just made. Any idea why? sh-3.2# mkdir /Users/Administrator/Documents/drive/ sh-3.2# mount -w -t "hfs+" /dev/disk1s2 ...
0
votes
2answers
35 views

Adjusting a Unix shell script to create a CSV from a log file

I have a Unix shell script which generates output from a log. for i in HistSimBasislieferung hedgeAccountingF4PublicSend;do report1=$(echo -n $i:) date1=$(grep -e $i $PALME_CONF | grep "The job ...