Display of historical information in Terminal on Mac? - terminal

Apparently, history could only display historical commands in Terminal on Mac.
Would it be possible to display historical information, including commands (history), error, success, other messages, for example
Performing Streamed
Install Success
or
Uninstalling /usr/local/Cellar/six/1.16.0_3... (20 files, 122.4KB)?
If so, how?
Thanks in advance.
Regards,
Wy

Related

intel vtune show only splash but doesn't run

Install oneapi_vtune_p_2021.7.1.471_offline(windows) without errors. After run I see splash screen about 20 second and then nothing. I tried to reinstall, but nothing. Tried to remove folder "AppData\Roaming\Intel" nothing.
Running with vtune-gui --log-to-console --log-level=debug shows me "[Error: ENOENT: no such file or directory, open 'C:\Program Files (x86)\Intel\oneAPI\vtune\latest\bin64-1']".
Has anyone come across this?
You are likely running VTune using a user account with Unicode characters in its name. This would be addressed in future VTune releases. Sorry for the inconvenience. As a temporary workaround please run VTune with a user account that has ASCII chars only. You could do Run As... to avoid switching between accounts.

redirect output of bash script to all open terminals

I'm trying to find a way to direct an echo command to all open terminals. Similar to the warning message sent out by "shutdown -k" that appears on all open terminals. Ideally I'd like more control over which users see the message then shutdown gives, but thats rather low on the priority list at the moment.
The reason:
I'm tweaking a dynamic domain name update script (run in cron) that I made a few years ago. Currently the script writes its output to a log file for diagnostics and a conf file for its memory, now I want it to also display a message in open terminals when it recognises a new IP address.
I know I've seen how to do this somewhere but I'm drawing a blank, and apparently failing at the googles.
Thanks in advance for any replys.
Using wall should do what you want.

Applescript "mixed credentials" error

I asked this question over on the Apple Communities and got a grand total of ZERO responses. You guys seem a whole lot smarter, so thought I would ask here to see what you think.
An error has started occuring when I attempt to trigger an Applescript via an external process. The console error is as follows:
12/09/2012 11:01:39.205 osascript[269]: Scripting addition loading restricted to system domains because this process has mixed credentials (issetugid=0 r/e uid=501/0 gid=20/20)
When I run the script locally on the Mac(Mini - Mountain Lion 10.8.1) it works perfectly.
What is happening is as follows.
I have a MacMini as a music server in a home automation environment powered by a Crestron processor. The MacMini is connected to two zones, one via the Optical output and another to a DAC from one of the USB ports. When I selected "Listen to iTunes" in one of the two zones the controller sends a command via UDP to a program running on the MacMini which triggers the scripts to change to the appropriate audio out.
All was working well until yesterday when all of a sudden the program triggering the script, whilst reporting that it has executed the correct script correctly, isn't switching the output and the above message is appearing on the console.
I have read what I can on here and as such have reset the PRAM and SMC (all three dongs...) and deleted the script triggering program, run Clean My Mac and rebooted, all to no avail.
Can anyone help me with this, it has to be something simple given that it was working...surely? I haven't run an update or changed anything else that I can think of.....
Any and all thoughts and input would be greatly appreciated.
Thanks
Marc
From the error it seems that you have an add-on to applescript called a "Scripting addition" installed, and that's causing the error. Most likely you do not need this add-on to perform your applescript code. So I would remove all scripting additions from my system and see if the applescript still works.
Search your system for scripting additions... ~/Library/ScriptingAdditions and /Library/ScriptingAdditions.
If you do need to do something that the scripting addition is doing for you, then there's probably other ways to perform the same task without the add-on.

Scripting Bridge and Apple Mail

I'm am getting ready to attempt to implement Scripting Bridge for the first time, specifically to allow my program to construct and send emails to individual (or all) members of an opt-in email database.
Unfortunately, I'm already stuck on the first step... creating the Mail.h file.
According to Apple's documentation:
To create a header file, you need to run two command-line tools—sdef and sdp—together, with the output from one piped to the other. This is the recommended syntax:
sdef /path/to/application.app | sdp -fh --basename applicationName
However, when I attempt to execute this, I receive the following errors:
-bash: sdef: command not found
-bash: sdp: command not found
My guess is that I'm trying to execute programs that are (clearly) not installed on my system, which is a MacBook Pro running Lion (10.7.4)
A quick google search turned up an older version of sdef for v10.4, but I'm now wondering: Is this process still the recommended procedure, or is there another way I should be generating a Mail.h header file? Apple's documentation is rather vague on this point.
Any help would be appreciated.
After some additional research and experimentation, I was able to get everything working by allowing XCODE to create the header files, rather than doing it manually from the command line.
XCODE also uses the sdp and sdef commands, but had no problem accessing them. I am still not entirely certain why I could not run the commands in the bash shell, but I suspect they must be run from the root user perhaps?
In any event, here is a link to the Apple Documentation which outlines the steps I took to get everything working correctly:
https://developer.apple.com/library/mac/#samplecode/SBSystemPrefs/Listings/ReadMe_txt.html
You should be able to use sdef and sdp after installing the command line tools. These are an optional install since XCode 4.3.
http://developer.apple.com/library/ios/#documentation/DeveloperTools/Conceptual/WhatsNewXcode/Articles/xcode_4_3.html#//apple_ref/doc/uid/1006-SW2

Does anyone know of a good alternative to Pipe Viewer for Windows Platform?

If you do not know what Pipe Viewer is (I did not know about it until 5 minutes ago), then this blog does a good job giving a brief introduction to it with some examples. I write a lot of Perl Scripts as an ETL developer and a lot of times, the files that I work with take really long time to operate with (unzipping, moving, etc). Therefore, this tool would be awesome except I work in a Windows Environment. If anyone knows of a tool that gives you Progress of an operation running in the pipeline, please let me know as that would make my scripts that much more useful.
I finally made it work on Cygwin environment though that is not answer for the original post.
--disable-nls does the trick.
./configure --disable-nls
make
make test
cp pv /usr/bin
== by Kenji (k2) ==
Cygwin has pv (Pipe Viewer) as an available package since I don't know when... but it is not installed by default.
Download the Cygwin setup executablefrom the install page.
While installing cygwin, you need to expressly search and mark for installation pv found in the Utils section.
If you have already installed cygwin, you can always add it later on by re-running the setup executable.
I doubt such a tool exists for win32, but it should run on cygwin. But then again You probably don't use it :)
I suspect you want to use pipe viewer to catch the output performance (bytes/s) of a console application.
If you want to measure the performance IO read/write of a process, I recommend using Process Explorer. You can find performance for each process.
See https://learn.microsoft.com/en-us/sysinternals/downloads/process-explorer

Resources