Where is the code for "tee" in Mac OS? [closed] - macos

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Where is the code for the terminal command 'tee' located in Mac OS?
[Added] Is it possible to read the exact code, that my mac is using (not the online codes)?

By "code", I guess you mean source code, right? See there
EDIT: I see the question has been made more precise.
See exactly in the "plain" BSD code here as a Apple Developer login (free) is required to browse their code.

It's BSD, not Linux, code.
http://www.pell.portland.or.us/~orc/Code/bsd/bsd-current/tee/tee.c

http://www.ss64.com/osx/

Do you mean, where is the executable? If that's what you're asking, it's at /usr/bin/tee. You can locate any command in your path by using the which utility. It will print out the full path to the command. For example:
$ which tee
/usr/bin/tee
$
If you're asking about the actual source code, a number of answers are already here that provide you with links to Apple's source code. The utilities themselves are split amongst a number of packages and there's no real index, so you'll have to browse the names and check packages that sound like they might contain the source for any given utility.

Here is the source code of Apple's unix:
http://developer.apple.com/Darwin/
If it is up-to-date this is the exact code that your mac uses.

Related

What program in windows is equivalent to OS's terminal? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
Switching from programming on Mac to windows, and I need to access github. Don't know where to submit bash commands in order to clone my repositories.
I made the switch last year and I actually don't mind using Windows since I found some nice tools.
This is the best terminal I have found used yet: http://bliker.github.io/cmder/
New link: http://cmder.net/
New new link: https://cmder.app/
The great thing is you can use UNIX commands as well. You can even do something such as:
vim run.bat
to edit a batch file.
The closest built-in equivalent is cmd.exe. It is, however, not a bash shell: the command set is very different.
If you specifically need bash, you could install Cygwin.
If you're going the command line way for git access, you're probably looking for msys git: https://msysgit.github.io/

What is your favorite disassembler tool in Mac OS X? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I am using the otool, nm and Fraise text editor to disassemble the Mach-o binaries. My workflow at this point is pretty straightforward:
1. List the existed symbols.
nm -g
2. Get the disasm code.
otool -vt
3. Copy and paste this output to a text file.
4. Read and comment the code in the text editor :)
I am looking for the tools that simplify the working with disasm code on Mac OS X.
You might want to try
Hopper Disassembler,
osxdbg,
Machoview,
otx (otool GUI)
and Affinic Debugger GUI.
I als know of http://www.hopperapp.com/, but never used it.
(cannot be compared to Ida(Pro))

kcachegrind for windows [duplicate]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Is there any tool, other than KCacheGrind, being able to view callgrind results? Preferably for Windows platform?
I have compiled kcachegrind on windows using QT4.7, here is the binary bundle (including the dot utility to generate call graph):
http://sourceforge.net/projects/precompiledbin/files/kcachegrind.zip/download
Try WebGrind: https://github.com/jokkedk/webgrind
Runs on your local PHP server. Be careful, use XDebug profiling with the XDEBUG_PROFILE flag or otherwise you'll risk overwriting your profiling output when you open WebGrind (Since WebGrind is also a PHP web application). The WebGrind website also details other approaches to work around this. Cheers.
You can try WinCacheGrind.
It seems that WinCacheGrind cannot open output of callgrind. I have not tried opening output of cachegrind, but it should work, I guess.
From the Valkyrie page, (as of date) "Currently, Valkyrie supports Memcheck only, although work is in progress to handle Cachegrind and Massif."
alleyoop and valkyrie (broken link) are alternative front ends.
May have enough suport for what you want, you can use mingw to compile for Windows native if SUA does not work out of the box.
There's a new project called XCallGraph for viewing cachegrind files on Windows.
I have tried these:
QCacheGrind
KCachegrind
WinCacheGrind
XCallGraph
They're very similar but differ in details. I can recommend the QCacheGrind which is the most feature packed and has also a graphical representation, which can help to identify problems much faster.

Custom (interactive) shell with Python [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I'm currently trying to make some small shell-like utility for a custom script I wrote, so I can easily work with it (it's rather simple, so an interactive shell would be perfect).
Do you have any resources for me on how to create a shell in Python? I spent googling for a while, but all I could find was information about IDLE and similar Python interpreters. But I would rather want to know how to write a completely custom and command line based shell.
My approach would be hooking the stdin/out for commands, but given that the Python library offers so many great utilities, I want to make sure there if there is no better way.
The cmd module in the standard library could be a start -- if you have any trouble using it, please post more specific questions (ideally with some toy example showing what you're trying to achieve and what you're getting instead!).
You might have a look at pyparsing. It is definitely only about lexing and parsing, but that's definitely the hardest part of the problem.

Windows Callgrind results browser, alternative to KCacheGrind [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Is there any tool, other than KCacheGrind, being able to view callgrind results? Preferably for Windows platform?
I have compiled kcachegrind on windows using QT4.7, here is the binary bundle (including the dot utility to generate call graph):
http://sourceforge.net/projects/precompiledbin/files/kcachegrind.zip/download
Try WebGrind: https://github.com/jokkedk/webgrind
Runs on your local PHP server. Be careful, use XDebug profiling with the XDEBUG_PROFILE flag or otherwise you'll risk overwriting your profiling output when you open WebGrind (Since WebGrind is also a PHP web application). The WebGrind website also details other approaches to work around this. Cheers.
You can try WinCacheGrind.
It seems that WinCacheGrind cannot open output of callgrind. I have not tried opening output of cachegrind, but it should work, I guess.
From the Valkyrie page, (as of date) "Currently, Valkyrie supports Memcheck only, although work is in progress to handle Cachegrind and Massif."
alleyoop and valkyrie (broken link) are alternative front ends.
May have enough suport for what you want, you can use mingw to compile for Windows native if SUA does not work out of the box.
There's a new project called XCallGraph for viewing cachegrind files on Windows.
I have tried these:
QCacheGrind
KCachegrind
WinCacheGrind
XCallGraph
They're very similar but differ in details. I can recommend the QCacheGrind which is the most feature packed and has also a graphical representation, which can help to identify problems much faster.

Resources