2,468 reputation
212
bio website none
location Massachusetts
age 39
visits member for 2 years
seen yesterday

Apr
14
comment Split a file into two files at a given line
There is a slight chance that head will read more than just 100 lines in order to find the first 100 lines to output to f1.txt; those extra bytes will not be seen by cat.
Apr
7
answered Using \r in bash PS1
Apr
7
comment Terminal's bin/bash not responding
Be aware that /usr/local/bin/bash was probably a new version than the version 3.2 that ships as /bin/bash, so there is a slight chance of some compatibility issues for scripts that assume behavior specific to bash 3.2. This should not be a problem for system scripts, as I think the different versions of bash behave identically when invoked as /bin/sh.
Apr
7
comment How to create a directory named '-p' under Linux with Bash?
Shouldn't, then, the question be "How to delete a directory named '-p' under Linux with Bash"?
Apr
2
awarded  Yearling
Mar
16
awarded  Tumbleweed
Mar
11
comment Different /bin/sh for a specific user
More accurately, /bin/sh is usually not the Bourne shell itself, but a link to another shell which adheres to the POSIX specification, which itself is based on but not identical to the original Bourne shell.
Mar
11
revised input from shell in bash script
added 3 characters in body
Mar
11
answered Can't get a bash to work with python on a SGE
Mar
9
asked rpm/yum: require minimum version of optional package
Mar
8
comment Mac OS X Terminal Error: undefined method `grep'
The error message is definitely from the Ruby command. You could remove it; delete the backquotes and everything between them. A more general fix would be to modify the Ruby command to avoid the error, but I don't know enough Ruby to explain how.
Mar
7
comment Bash provide options and pass variable on choice
Also asked at stackoverflow.com/q/22239152/1126841 (which is the correct site for this question).
Mar
7
comment Mac OS X Terminal Error: undefined method `grep'
Looks like a problem with a command that runs when bash displays the prompt. What are the contents of $PS1 and $PROMPT_COMMAND?
Jan
2
comment Shell: how write multiline text file without escaping special symbols?
See the section of the man page under "Here documents". The relevant sentence is "If any characters in word are quoted, [...] the lines in the here-document are not expanded".
Dec
9
comment Why does setting the bash prompt (PS1) cause root to have a $ instead of a #?
If you ever do need to use double-quotes for some reason, use PS1="...\\\$" to ensure that the literal pair \$ is stored in PS1 for the shell to interpret later.
Dec
5
revised why does this work in a shell for loop but not by itself
edited body
Dec
5
revised How do I convert a bash array variable to a string delimited with newlines?
edited body
Dec
4
awarded  bash
Dec
3
answered Common keyboard shortcuts for zsh zle and bash readline
Dec
3
awarded  Custodian