Questions tagged [bash]
Bash is a free shell for Unix-like operating systems from the GNU Project.
11,779
questions
23
votes
6
answers
3k
views
Last parameter of last command in bash in vi-mode
I have been convinced (over at Stack Overflow) to use my beloved bash in vi mode. So far I got used to it quite well and I like it.
However I really do miss one feature: In emacs-mode, you can enter ...
22
votes
4
answers
11k
views
How do I combine stdout and stderr for different shells?
I know the answer for some shells, e.g. with cmd.exe you can:
some.exe > out.txt 2>&1
How do you achieve the same for other shells (bash, ksh, tcsh, powershell, etc)?
19
votes
11
answers
86k
views
Is there a way to get iTerm + Bash usability on Microsoft Windows?
I've been using Bash for years and I really like iTerm. Is there a way to get that level of console usability for Micosoft's Windows cmd?
By that I mean the sane tab completion, history (even if you ...
5
votes
3
answers
996
views
/usr/bin/reset disables backspace
Following this question, running /usr/bin/reset destroys my backspace functionality.
What can I do? After pressing backspace I get ^?
0
votes
1
answer
277
views
How can you source in a file of .markdown -format?
I have a file which needs many tables in html.
I have the tables in separate files.
I run in a file.markdown unsuccessfully
source ./table.html
How can you source in a file of .markdown -format?
5
votes
1
answer
205
views
Redirection: How did the extra word get in the file?
I was testing a script and wanted to create a small file with a bit of text in it so I typed the following and forgot to escape the space in the filename:
echo "bob">other name
When I did ls, it ...
4
votes
4
answers
2k
views
Open a file type with shell script in OS X
I'm trying to figure out if it's possible to program the open action (double clicking on a file) for a given file extension in OS X as:
Pass the file's absolute path to a shell script (bash or ruby ...
16
votes
1
answer
2k
views
When should I put configurations into .bashrc vs into. .bash_profile?
I was looking at Questin 9152: Why doesn’t my path update now?. Which customizations should go into my ~/.bashrc file vs. into my ~/.bash_profile file?
60
votes
9
answers
63k
views
How can I prepend a line number and tab to each line of a text file?
How can I append a line number and tab to the beginning of each line of a text file?
111
votes
7
answers
244k
views
How to remove a symbolic link to a directory?
I am using Ubuntu 8.10, Bash and I made a symbolic link with the following command:
ln -s ../test5
I want to remove it now but my rm fails:
rm -Rf test5/
rm: cannot remove `test5/`: Not a directory
...
2
votes
2
answers
875
views
Why doesn't my path update *now*?
I recently installed the newest Qt SDK and I went ahead and added it to my PATH inside of my ~/.bash_profile.
I don't see the change. I can source ~/.bash_profile but then my path is twice as long, ...
14
votes
8
answers
5k
views
Save me from gibberish terminal
While logged in to a remote ssh session, sometimes I do cat to the wrong file (a binary or a diretory) and the display converts to gibberish. The only way out is to close the terminal and open a new ...
38
votes
8
answers
30k
views
Rename a group of files with one command
If I have a group of files with a .htm extention, how can I rename them all to .html?
mv *.htm *.html
does not work.
37
votes
2
answers
25k
views
Can the output of one command be piped to two other commands?
How can I pipe the output of one command to the input of two other commands simultaneously?
397
votes
13
answers
289k
views
How can I search the bash history and rerun a command?
Can I search history in bash and run the result?