03-15-2012
Nice and simple, and works great, thanks!
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