Since 4/2/2012 5:16:28 AM, ben.usenet has written 8 articles and participated in 6507 conversations. ben.usenet signature: ben.usenet
ben.usenet's articles:
Items(8) /1
Capturing stderr?347 (6/8/2012 1:46:05 PM) comp.unix.shell I have a bash script that captures the output of a command (it's gpg, as
it happens) and also tests the exit code:
out=$(command 2>/dev/null)
[[ $? -eq 0 ]] || exit 1
In order to improve the error m... Ben
Performance of hand-optimised assembly10867 (12/23/2011 6:43:32 PM) comp.lang.c I'm starting a new thread, but it is prompted by this remark from 88888 Dihedral about a short binary search function I posted: | Do you consider to convert 5 to 10 lines of C to assembly? | I did that 20 ye... Ben
Linking an array of const pointers253 (9/2/2011 5:19:54 PM) comp.lang.c++ I have an array (much messier than this cut-down example) that I want to hive off into another source file, but the two compiled files won't link: m.cc: extern int *const table[]; int main() { ... Ben
Hyperlinks in the old ansi.c.txt file4155 (2/22/2011 12:31:51 AM) comp.lang.c
I was recently using the widely available text file ansi.c.txt to check
something or other and I started to get annoyed at how hard it was to
read and navigate. I therefore made myself an HTML version that... Ben
_overflow in lcc-win327255 (12/30/2010 3:35:20 PM) comp.compilers.lcc Trying to test _overflow() in lcc-win32 I got an error message that _overflow has no prototype and (from the linker) that __overflow is undefined. Do I need some command-line flag to turn this feature on? -- ... Ben
inline with static1278 (2/8/2010 11:44:51 PM) comp.compilers.lcc
While trying to understand something you said in comp.std.c I came
across the following that looks like a bug to me:
inline int f(void)
{
static int x = 0;
return x++;
}
in... Ben
Dik Winter34296 (1/5/2010 11:38:53 PM) comp.lang.c I have just heard the sad news that Dik Winter died on the 28th of
December, a couple of months before he was due to retire.
http://www.cwi.nl/en/2009/1044/Dik-Winter
Since he was a frequent poster here, I... Ben
Adding size in the new "safer" string functions.957 (4/17/2007 8:18:17 AM) comp.lang.c++ I am porting a program from the Windows world to the Linux world. The source uses MS's new "safer" string functions such as: strcat_s(dest, size, source); but there are also calls such as: strcat_s(dest... Ben
Struct pointer vs. struct array pointer1722 (2/20/2013 9:17:32 AM) comp.lang.c Say I'm using a standard windows RECT structure...
RECT *prect;
// I can write
prect->left = 0;
// but I can also write
prect[-1].left = 0;
prect[0].left = 0;
prect[1].left = 0;
and the compil... aleksaZR(112)
find -exec; how to insert a block of code922 (2/20/2013 7:13:06 PM) comp.unix.shell I'm trying to write a script that records checksums recursively for all
files in each subdirectory. Is there a syntax that will let me execute:
cd '{}'; md5sum \* > md5sum.out
from within an -exec comma... sendmenospam(36)
Linux/bash: Conditionally redirecting to a pipe1026 (2/22/2013 5:27:49 PM) comp.unix.shell For the purposes of this exercise, you can assume Linux & bash.
A problem I frequently run up against is like this:
[ "$1" = "-pipe" ] && pipe="| somepipe"
somecommand $pipe
I hope it is clear enough ... gazelle3(1598)
Regarding man CHMOD command214 (2/27/2013 6:22:43 AM) comp.unix.shell Can someone please patiently explain the following man file for CHMOD
with appropriate examples? I changed the permissions for my pendrive
files and folders and for this I ran into man CHMOD and got the fol... bkpsusmitaa(30)
Find and insert into an array519 (2/28/2013 9:16:48 PM) comp.unix.shell Hopefully this is simple fix. I have an array of names to look for specific=
names. It works fine unit it hits upon a multiple matches, all those match=
es go into the same array table. Normally I would limi... MKruer(33)
removing repeating/duplicate control char623 (3/15/2013 7:31:58 PM) comp.unix.shell Hello,
I have a text file where I need to get rid of a repeating control character, I have tried sed and tr but not getting the results I expect.
The text file is as an example:
^M
text here
text here
... peter_sands(55)
tar: extract files only...616 (3/27/2013 10:35:09 AM) comp.unix.shell I am trying to extract files only (not the directory Clearlooks) from
this archive:
andrew@corinth:~/mplayer_build$ tar -tf Clearlooks-1.5.tar.bz2
Clearlooks/
Clearlooks/skin
Clearlooks/README
Clearloo... andrew7822(31)