03-15-2012
Installing Dash Shell on OS X Lion
For those interested in installing
dash shell on OSX Lion to help test POSIX compliancy of shell scripts, it is quite easy. I did it like this:
If you don't have gcc on your system:
0. Download and install the Command Line Tools for Xcode package from
Sign In - Apple *
1. Download the dash tar ball (I used the latest version 0.5.7) here:
Index of /~herbert/dash/files
2. gunzip and untar the tar ball
3. cd to the dash source directory
4.
./configure
5.
make
6.
sudo make install
7. add /usr/local/bin/dash to /etc/shells
S.
====
Update: On MacOS Catalina (10.15) and higher
/bin/dash is installed automatically so there these actions are no longer necessary, unless you want to try out a more recent version..
---
* See also here:
Xcode, GCC, and Homebrew, alternative package with gcc for OSX Lion at
Kenneth Reitz' OSX GCC Installer page
Last edited by Scrutinizer; 10-25-2019 at 04:58 AM..
Reason: Thanks Scott..
These 5 Users Gave Thanks to Scrutinizer For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I need to create a file that accepts arguments and options, and the options have to allow for single-dash options (-abc) and double-dash options (--help). What is the best way to do this? Getopt(s) is great for single-dash, but chokes on double-dash. Do I really need to save the arguments to a... (1 Reply)
Discussion started by: dhinge
1 Replies
2. UNIX for Dummies Questions & Answers
Hi!
I'm new in these forums and more or less new with Unix. So... here is the question:
does anyone know where is redirected the output of a command when you put >&- after it?
Does it means any standard file descriptor?
Thanks! (2 Replies)
Discussion started by: csecnarf
2 Replies
3. UNIX for Dummies Questions & Answers
so i have a simple file called -x and i need it renamed to x
now i dont understand why when using the most basic methods, only the code mv ./-x x changes the file name while using any other type of escape characters around the dash, such as single/double quotations or backslash, doesnt.
... (5 Replies)
Discussion started by: LumpSum
5 Replies
4. Shell Programming and Scripting
hi
I am using ksh
#A="abc-def"
#typeset -u B="$A"
#echo $B
ABC-DEF
how to remove the dash?
i.e.
ABCDEF?
thank you (1 Reply)
Discussion started by: melanie_pfefer
1 Replies
5. BSD
Hello, first of all, my name is Christian and I hope you are very welcome.
Well, my problem is that I would install the instant messaging client CenterIM in my shell, but it commands me or anything. Your operating system is FreeBSD.
Thanks. (0 Replies)
Discussion started by: LzbeL
0 Replies
6. OS X (Apple)
Hi
I am running Lion with latest patches
> uname -a
Darwin wger.local 11.2.0 Darwin Kernel Version 11.2.0: Tue Aug 9 20:54:00 PDT 2011; root:xnu-1699.24.8~1/RELEASE_X86_64 x86_64
Installed mplayer, ffmpeg, gnu-getopt and ImageMagick through brew.
I am unable to generate Video Contact... (0 Replies)
Discussion started by: slashdotweenie
0 Replies
7. OS X (Apple)
Anyone running Lion on their Mac?
I'm currently running Snow Leopard (v. 10.6.8) and have been hesitant to upgrade to 10.7.X.
Anyone at all running Lion? Any experiences good or bad to report?
Thanks! (7 Replies)
Discussion started by: Neo
7 Replies
8. Shell Programming and Scripting
Hi,
I must be overlooking something, but I don't understand why this doesn't work. I'm trying to grep on a date, excluding all the lines starting with a dash:
testfile:
#2013-12-31
2013-12-31code:
grep '^2013-12-31' testfileI'm expecting to see just the second line '2013-12-31' but I don't... (3 Replies)
Discussion started by: Subbeh
3 Replies
9. Shell Programming and Scripting
Well, guys I saw a question about GOTO for Python.
So this gave me the inspiration to attempt a GOTO function for 'dash', (bash and ksh too).
Machine: MBP OSX 10.14.3, default bash terminal, calling '#!/usr/local/bin/dash'...
This is purely a fun project to see if it is possible in PURE... (3 Replies)
Discussion started by: wisecracker
3 Replies
10. OS X (Apple)
Hi all...
Apologies for any typos, etc...
This took a while but it didn't beat me...
Although there are many methods of generating random numbers in a POSIX shell this uses integer maths and a simple C source to create an executable to get epoch to microseconds accuracy if it is needed. I take... (8 Replies)
Discussion started by: wisecracker
8 Replies
LEARN ABOUT DEBIAN
hardened-cc
HARDENED-CC(1) Debian GNU/Linux HARDENED-CC(1)
NAME
hardened-cc - gcc wrapper to enforce hardening toolchain improvements
SYNOPSIS
export DEB_BUILD_HARDENING=1
gcc ...
DESCRIPTION
The hardened-cc wrapper is normally used by calling gcc as usual when DEB_BUILD_HARDENING is set to 1. It will configure the necessary
toolchain hardening features. By default, all features are enabled. If a given feature does not work correctly and needs to be disabled,
the corresponding environment variables mentioned below can be set to 0.
ENVIRONMENT
DEB_BUILD_HARDENING=1
Enable hardening features.
DEB_BUILD_HARDENING_DEBUG=1
Print the full resulting gcc command line to STDERR before calling gcc.
DEB_BUILD_HARDENING_STACKPROTECTOR=0
Disable stack overflow protection. See README.Debian for details.
DEB_BUILD_HARDENING_RELRO=0
Disable read-only linker sections. See README.Debian for details.
DEB_BUILD_HARDENING_FORTIFY=0
Don't fortify several standard functions. See README.Debian for details.
DEB_BUILD_HARDENING_PIE=0
Don't build position independent executables. See README.Debian for details.
DEB_BUILD_HARDENING_FORMAT=0
Disable unsafe format string usage errors. See README.Debian for details.
NOTES
System-wide settings can be added to /etc/hardening-wrapper.conf, one per line.
The real gcc symlinks are renamed gcc.real, and a diversion is registered with dpkg-divert(1). Thus hardened-cc's idea of the default gcc
is dictated by whatever package installed /usr/bin/gcc.
SEE ALSO
hardened-ld(1) gcc(1)
Debian Project 2008-01-08 HARDENED-CC(1)