bsd Questions

3

Solved

I'm working on mac OS 10.7.4. using Xcode 4.3.2 . I had a *.a static library file from my partner. I want to know which architecture it is built for. Is it ARMv6, ARMv7, i386 or other architecture...
Luteous asked 17/8, 2012 at 7:1

4

Solved

I'm writing an (un)archiving tool and the way it is designed it first creates a regular file from the archive before it examines the special attributes and may decide that this item is a symlink, i...
Balbo asked 24/2, 2010 at 23:43

4

I run git grep "\<blah\>" regularly on my linux development server, but I just discovered that I am not able to use \< and \> on Mac (Mac OS X 10.6.8) (not able to use = it does not fin...
Lawful asked 30/9, 2011 at 8:35

12

I'm looking for alternative ways to obtain the command line parameters argc and argv provided to a process without having direct access to the variables passed into main(). I want to make a class ...
Polypetalous asked 3/5, 2016 at 7:26

6

For a few years, I often have a need to combine lines of (sorted) text with a matching first field, and I never found an elegant (i.e. one-liner unix command line) way to do it. What I want is simi...
Photochromy asked 13/10, 2017 at 16:51

2

Solved

Currently, I have implemented a singly linked list, like so: struct PeerNode { struct Peer* cargo; struct PeerNode* next; }; ...and I have a struct that contains a couple of these linked lists...
Failsafe asked 2/10, 2011 at 14:58

15

Solved

Is there an invocation of sed todo in-place editing without backups that works both on Linux and Mac? While the BSD sed shipped with OS X seems to need sed -i '' …, the GNU sed Linux distributions ...
Makassar asked 17/4, 2011 at 14:59

6

someone i know encountered a problem when running 'lmutil' so i asked them to strace -f lmutil. Why is execve failing with "No such file"!!! It makes no sense, since I am straceing the very same fi...
Spermiogenesis asked 8/3, 2011 at 14:53

3

Solved

I'm wondering how I can do a multiple find/replace using a single sed statment in Mac OSX. I'm able to do this in Ubuntu but because of the BSD nature of OSX, the command must be slightly altered. ...
Tinker asked 25/10, 2013 at 13:18

1

I wrote the following command echo -en 'uno\ndue\n' | sed -E 's/^.*(uno|$)/\1/' expecting the following output uno This is indeed the case with my GNU Sed 4.8. However, I've verified that BSD Se...
Sherylsheryle asked 11/4, 2022 at 21:21

2

I wrote this program that should just exit with exitcode 44: // prog.S #include <sys/syscall.h> .text .globl _start _start: subl $8, %esp pushl $44 pushl $0 movl $SYS_exit, %eax int $0...
Quinquereme asked 5/2, 2022 at 17:27

16

Solved

Ping returns this by default: 64 bytes from 203.173.50.132: icmp_seq=0 ttl=244 time=57.746 ms Is there some way I can get it to add the timestamp? For example, Mon 21 May 2012 15:15:37 EST | 6...
Negron asked 21/5, 2012 at 5:17

4

Solved

I am writing a shell script that needs to do some date string manipulation. The script should work across as many *nix variants as possible, so I need to handle situations where the machine might h...
Ponton asked 5/1, 2012 at 18:35

6

Solved

I'm interested in verifying if a given iPhone static library has been built for ARM or Intel. It's more curiosity than anything. Is there some kind of Mac OS X or BSD specific tool to do this? Th...
Illusionism asked 6/7, 2009 at 2:12

3

Solved

I use sed command on mac OS, following is the text. $ cat pets.txt This is my cat my cat's name is betty This is your dog your dog's name is frank This is your fish your fish's name is george ...
Scalp asked 28/9, 2014 at 3:39

2

Solved

I have recently started using OpenBSD. And I want to create easy fire-and-forget containers/VM or something es (it should be used as a Sandbox). The user can upload his source code (C++/Java...
Ricebird asked 1/9, 2016 at 7:24

5

I have a large text file with content set up like this: --- title: Lorim Ipsum Dolar --- Lorim ipsum content --- title: Excelvier whatever --- Lorim ipsum content goes here. I'm trying to spli...
Celestyn asked 21/8, 2013 at 17:52

5

Solved

Neither ISO C nor POSIX offer functionality to determine the underlying OS during runtime. From a theoretical point of view, it doesn't matter since C offers wrappers for the most common system cal...
Tinytinya asked 3/1, 2012 at 1:21

3

Solved

I've looked this up a thousand times, and I always forget it, so, here for eternity: Solaris has a bit of an awkward syntax for tail. How do I do the equivalent of BSD's tail -nN? What I want ar...
Pearsall asked 24/11, 2008 at 14:42

4

Solved

Greetings, how do I perform the following in BSD sed? sed 's/ /\n/g' From the man-page it states that \n will be treated literally within a replacement string, how do I avoid this behavior? Is t...
Stoical asked 14/9, 2009 at 13:13

2

Solved

In my bash script on mac (snow leopard) I have a path and filename, and I need to get the modified date/time of that file. I found I could do: stat -f "%m" $MYFILE However, that returns what I a...
Septum asked 29/8, 2012 at 1:25

8

Solved

How can one detect being in a chroot jail without root privileges? Assume a standard BSD or Linux system. The best I came up with was to look at the inode value for "/" and to consider whether it i...
Cockpit asked 16/9, 2008 at 18:4

3

Solved

Despite a careful read of the related standard documentation, I can't understand what's the expected behavior in POSIX compliant systems when a open system call is invoked with flags including O_CR...
Muchness asked 22/8, 2017 at 13:11

2

Solved

Previously I was receiving warnings from gcc -std=c99 that usleep() was implicitly declared. Then I stumbled across this stackoverflow post, which led me to use -D_BSD_SOURCE. However, now gcc tell...
Waiter asked 23/3, 2015 at 0:17

1

Solved

I want to remove the first line of all files in a folder if the file starts with uuid and so I have a working sed command looking like this: $ sed -i '' '/^uuid/d' * which works fine and removes ...
Melia asked 9/12, 2017 at 20:7

© 2022 - 2024 — McMap. All rights reserved.