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

learn more… | top users | synonyms

1
vote
1answer
78 views

Infinite loop in Terminal (ksh) to launch commands

I'm trying to create a loop in terminal to launch every second during the execution of an script the following command. I don't want to create the loop in .sh script file, i'm trying to do in the ...
0
votes
0answers
59 views

Only single beep for a series of bells in PuTTY

After typing echo -ne '\a' && echo -ne '\a' in PuTTY session only single beep is being produced on local computer instead of two beeps. What is the reason? In PuTTY settings for this ...
1
vote
1answer
55 views

Linux Bash Shell - File globbing specific range?

I have a bunch of files in a folder: spreadsheet700.xls spreadsheet800.xls spreadsheet850.xls spreadsheet1005.xls spreadsheet2400.xls how can I use file globbing to select files that numbers end in ...
1
vote
0answers
51 views

Cron deamon written in shell

I'm looking for a script in bash or ksh, that would do ... more or less ... the same as crond. The situation is, that our system administrator suddenly denied the use of crontab to all regular users ...
0
votes
1answer
20 views

post-order for find -exec?

I want to remove certain directories from a hiearchy using 'find -exec' find $rootdir -type d -name target -exec rm -rf {} \; I get error messages find: `foo/bar/target': No such file or directory ...
-2
votes
1answer
58 views

On telnet session file edit not happening using vi editor

I used rlwrap because with telnet session arrow keys were not working, after starting telnet session with rlwrap am not able to edit the file in using vi editor. Whether its problem with rlwrap.If i ...
0
votes
2answers
57 views

How much delay does two sequential linux commands have if they are run as a shellscript?

I have two commands A and B. I want to execute them together, but the only feasible way in linux is to use &. That is, $ A & $ B I don't expect 0 delay two commands, but approximately, how ...
1
vote
0answers
39 views

Windows 3.11 maximized shell window in SYSTEM.INI

I use a way to run 16-bit applications by running them in emulated Windows 3.11 in DOSBox. I automatically mount the directory containing the application, set the SHELL property in SYSTEM.INI to the ...
0
votes
1answer
33 views

shell command to create system v ressource key compatible to ftok system call

I'm working with system V shared memory in an application. during development I need to inspect and, sometimes, delete the memory segment. I know there is the ipcs command to inspect shared memory, ...
0
votes
0answers
43 views

Ubuntu: `env -i bash --norc`, but include essential variables such as HOME, DISPLAY? (where are these set?)

Is there an easy way to isolate a session of bash so that only essential variables (HOME, USER, DISPLAY, etc.) are preserved? (essential in that many programs fail if HOME, DISPLAY, TERM, SHELL, etc. ...
0
votes
1answer
93 views

zsh (or maybe oh-my-zsh) history gets confused with multi-line commands

if I use the up arrow in a zsh session, as you'd expect I get previous commands, from newest to oldest. Now (whether it's zsh or oh-my-zsh doing this I don't know), but if I type the start of a line ...
1
vote
1answer
25 views

Is it possible to sed -i from a text file to another text file?

I'm coding a shell script on my Debian box and there's a line on the script that needs to delete some emails from a textfile that is full of emails, like this: sed -i ...
0
votes
0answers
139 views

how to send encrypted mail using mailx command in unix

I want to make my email encrypted as email is confidential. Can anyone please tell me how to encrypt the email using the mailx command. In my shell script I have already used mailx to send the emails, ...
2
votes
1answer
114 views

How to encrypt my everchaging files for Dropbox while keeping them decrypted locally? [closed]

I would like to encrypt my files for outside use (e.g. for Dropbox), but keep them unencrypted on my hard drive (for instance, to be accessible by indexing and other 3rd party software). Similar to ...
2
votes
1answer
40 views

Hex of filesize

I am following a tutorial on few kernel dev. I encountered an operation where I have to use dd like dd ... if=PBL.bin of=... count=block_number The block_number variable is defined to be as The ...
1
vote
2answers
170 views

Mac Terminal showing bash instead of my username

This makes it hard to know what directory I am in. I installed a version of python for school and now it says -bash-3.2$ instead of MyMacbook: ~$. I'm sure this is really simple, but I know nothing ...
1
vote
1answer
57 views

error handling in case sentences [Shell Script]

I have this setup and I need when an error happened in the main script, to take this error to a $INFO_PLUGIN temp file, the problem is the script continues working after case and send also an OK ...
1
vote
1answer
53 views

permission denied in running script

I am running a script but there is an unusual warning: This is what happened in my console #whoami root #ls -l test.sh -rwxr-xr-x. 1 root root 1894 Feb 2 01:58 test.sh #./test.sh -bash: ./test.sh: ...
0
votes
1answer
103 views

ZSH: Where to place environment variable so that launched application can pick it up?

I need an environment variable KEY="value" made available to a GUI application before starting it. The launcher file (the one that places the icon on the desktop and sidebar in Ubuntu) has a value of ...
1
vote
4answers
97 views

How to move only files with other equal filename but different extension in the folder

I have a lot of folders, some with mp3 files only, others with m4a files only, other with files of both extensions. I need to identify which folders have files in both extensions, then move the mp3 ...
2
votes
3answers
633 views

Windows 8.1 + Classic Shell, how well does it restore Windows 7's functionality?

I prefer a classic Windows UI. I enjoy Windows 7, but have heard that Windows 8.1, despite its unconventional interface, includes some under-the-hood improvements, such as faster boot times and better ...
0
votes
2answers
23 views

Copy folder and all therein to parentParentParentFolder

i have the following structure: NASEN/Backup/CRON/2014 i want the folder "2014" to be copied to NASEN/2014 How to do this considering i am in "NASEN/Backup/CRON/" or root "NASEN" to input the ...
2
votes
1answer
39 views

unix expr command shows strange results comparing integers

When I write expr 123 \< 5 the result is correct (0) because expr evaluates two integers. Also expr 123. \< 5 gives the expected result (1) because now it compares two strings. ...
2
votes
2answers
42 views

Locating the source of a function in zsh

I have this annoying issue in my zsh shell where a function is being declared somewhere and that function is named "cp" so it's overriding the normal cp behavior. I'm trying to locate the function ...
0
votes
1answer
12 views

How to enable special carachters in moc?

I am using moc (what is moc) on OSX 10.9 in the zsh. I want to enable special german characters like ä, ü, ö and ß for it. Does someone know how to do that?
1
vote
0answers
117 views

Adding a new (hidden) “Delete” Context Menu item to Windows 7

I would like to add a new "Delete" context menu item such that I can delete large amounts of files and folders with a single right click without using explorer because of how slow it is. I have ...
0
votes
1answer
33 views

Is it possible to connect to the local Windows shell with PuTTY?

I don't know of a working Windows SSH server (not one that I trust enough, yet, at any rate). Therefore, I can't simply connect to localhost on port 22 from PuTTY. I want to use PuTTY because the ...
0
votes
0answers
45 views

How can my bash script inherit core limits from a C shell?

I'm using tcsh for my shell. I disable core dumps by running "limit core 0". Running a program that crashes from my shell, I can see that indeed no core dump is generated. Next I have a wrapper ...
2
votes
4answers
553 views

Bash script, string not replaced correctly with escaped $ and & characters

I have created a shell script which takes a string as input. If the string contains $ or &, then I need to replace those characters with \$ and \&. I could done that with sed command. After ...
2
votes
2answers
109 views

How to set specific file permissions when redirecting output?

This is probably a duplicate, but all my searches are turning up questions about permission denied errors. I am running a command in a bash shell. I want to redirect output to append to a file that ...
0
votes
0answers
82 views

mutt client: Not able to save sent messages in “Sent Items” folder

I have configured mutt as the mail client to send the mail using Linux command line. I have configured the mail client by saving the configuration in the .muttrc file. I am able to retrieve all the ...
1
vote
1answer
30 views

Nested substitution in ZSH

I use zsh. Say, for instance, that I want to remove the current directory from cdpath. That means that I need to remove an element based on content, which fits the ${name:#to_be_removed} pattern ...
0
votes
1answer
121 views

Use the ascii code of a character as an input to sort

I'd like to sort a file with a specific delimiter (ascii 0xff) and the records are zero-terminated. I cannot use the following command though: $ sort -z -t \xff -o data data The error message is: ...
3
votes
2answers
876 views

Unknown ruby interpreter version

I have a MacBook Pro, running Mavericks, but I'm not too acquainted with its inner workings. I'm just a humble CS student. After installing Ruby 1.9.3 and Rails 4.0.0, I get this annoying message ...
1
vote
2answers
100 views

How to insert bash scripts inside the PS1 variable

I made a custom PS1 variable, which is a tremendously confusing. Here is the one that is closest to being fully working: PS1="\n[\e[1;31m]\u@\H[\e[35m] \@ [\e[32m] PWD: \w [\e[1;34m]This folder ...
3
votes
3answers
431 views

Why do people source bash_profile from bashrc instead of the other way round?

It sounds like most terminal emulators don't run local sessions as login by default, so they'll load bashrc rather than bash_profile. So why do most people put everything in bash_profile and have ...
0
votes
1answer
17 views

Linux - Render Special Shell Characters Literally

I'm attempting to connect to a local Windows share via samba with my credentials. the password I am using to connect contains a exclamation point. When I run this command, the shell inputs the last ...
0
votes
0answers
99 views

Cygwin can't execute Shell script

I am trying to execute a Shell script using Cygwin. When I type this in the Cygwin terminal: sh build-native.sh I get this: build-native.sh: line 2: ndk-build: command not found It's a script ...
0
votes
0answers
26 views

How do I determine whether a program other than bash is running in a different pane in tmux, and if so suspend it and return to the shell temporarily?

I am trying to write a bash script to script tmux and do things in every pane in my current window. That I have down, but I'd like to be able to know if another window is running the shell or if I'm ...
0
votes
3answers
134 views

How to delete all hidden .swp files from terminal

How can I delete all .swp files? I tried rm *.swp but I got rm: *.swp: No such file or directory rwxr-xr-x 16 teacher staff 544 Jan 17 13:19 . drwxr-xr-x 19 teacher staff 646 Jan 16 12:48 ...
1
vote
1answer
51 views

Prevent braces in BASH to create sub-shell

I need braces to specify evaluation priority of expressions, but I don't want braces to create sub-scripts. Look what happens when that example code is ran: Example script #!/bin/bash false || ...
1
vote
2answers
524 views

Linux: How can I delete all files whose file name is more than X characters in length?

I want to delete all files in the current directory and sub directories whose file name is more than a particular length. Is there an easy way of doing this from bash?
3
votes
2answers
453 views

Shell script running from cron not running python

I have python program, I want to run it everyday with different variable (on CentOS server): #!/bin/sh /usr/bin/python /root/testing/test.py --variables /root/testing/daily/test1.txt while [ $? != 0 ...
0
votes
0answers
9 views

How to create a pane with a height of 1

I'm writing a bash script that uses tmux. In it, I want to create a pane wioth a height of 1 line. I tried doing tmux splitw -v -l 1, but that just gave me a pane with a height of 2. I also tried ...
1
vote
1answer
16 views

Forwarding shell to servers without installing it

is there any way how to forward a shell to a server without installing it on that box? This is what I need to do: I work for company where we admin X boxes and I will probably not be allowed to ...
0
votes
1answer
99 views

Save session using shell command in KDE

I can save my KDE session using the KDE start menu. But how could I achieve to save my session by shell command ?
0
votes
0answers
30 views

What is wrong with this configuration of sudoers file?

I have to execute a shell script as another user, but without be prompted for password. I've edited the etc/sudoers file with visudo, adding the following line. _www localhost=(otheruser) ...
0
votes
1answer
32 views

Supressing backup files in a ls command not working

How do I suppress backup files displayed in ls? I've already tried - ls --ignore-backup and ls -B Neither suppress the back-up files created by the editors. Am I doing something wrong? or Is there ...
0
votes
1answer
43 views

Trouble 'generating' bash aliases

In my ~/.shortcuts, I have symlinks to some frequently used directories. In .bashrc (OS X), I am doing this: ls -1 ~/.shortcuts | xargs -I {} alias {}="'cd -P ~/.shortcuts/{}'" When I run alias in ...
1
vote
0answers
41 views

In the Open Firmware shell, how do I get output from ls to not scroll off the screen?

I'm working on a PowerPC-based Macintosh G4. In the Open Firmware shell, I'm using the ls command to show the device tree, but part of the information I need is toward the top of the tree, and scrolls ...