Hot answers tagged command-line
Please realize that disabling the password prompt for sudo is a huge security concern. However, it is possible. Instead of what you already have, add this to your /etc/sudoers file: petruza ALL=(ALL) NOPASSWD: ALL Here is some more reading on this topic.
Either upgrade your bash (homebrew) or you'll have to recode it using a series of if statements: case "$OSTYPE" in linux-gnu*) ;;& linux*) echo $OSTYPE; ;; esac case "$OSTYPE" in linux-gnu*) ;& linux*) echo $OSTYPE; ;; esac would be # first case if [[ $OSTYPE == linux-gnu* ]]; then : # nothing in this branch fi if [[ $OSTYPE == linux* ]]; ...
Your Bash prompt is not properly escaped for non-printing characters, so it thinks the prompt is longer than it truly is (and doesn't delete some of the characters). To fix it, add \[ and \] around the invisible parts. You need to change it to: export PS1='\[\e[31m\]\W\[\e[0m\] '
The commands shown in the title indicate that something is being run. This is likely to be in a sourced file such as… ~/.bash_profile ~/.profile /etc/profile ~/.bash_login ~/.bashrc (although this is not sourced automatically) Check the files that your shell is sourcing for the commands that are being run and comment them out or remove them if necessary. ...
Read the current setting defaults read com.apple.BezelServices dAuto Write defaults write com.apple.BezelServices dAuto -boolean true/false
As aglasser commented, you can use textutil like so: create-codeblock | textutil -stdin -format html -convert rtf -stdout | pbcopy
Figured it out. It was as simple as replacing both words with $(ls *) So final command is: printf "From: Sender Name <firstname.lastname@example.org>\nTo: email@example.com\nSubject: $(ls *)\n\n$(ls *)\n" | /usr/sbin/sendmail -F "Sender Name" -f "firstname.lastname@example.org" "email@example.com"
You can install coreutils with brew install coreutils. shuf will be linked as gshuf. Read the caveats when you install coreutils.
easy_install is part of setuptools. There's a handy script to bootstrap it: curl https://bootstrap.pypa.io/ez_setup.py -o - | python You may need to put sudo before python if it throws a permissions error. There's a few more details here: https://pypi.python.org/pypi/setuptools#installation-instructions but that one-liner should do the trick in most ...
Only top voted, non community-wiki answers of a minimum length are eligible