How can I direct messages from mac console.app to a log file?
I'm trying to complete a bash script to capture if an external webcam is active in a video conference session. Some users will switch the camera to the built-in MAC camera. When this happens I want to trigger a set of events.
Things tried: reviewed the console.app to look for patterns on when the switch occurs in a user test & discovered messages indicating when the facetime camera changes state. I found this
I thought I could simply grep these message from the console.app but it seems to be easier said than done. I thought i could find the msgs in one of the console report files but When I look at the various reports on the console, i'm not finding a report that contains the messages above. How can I direct messages from console.app to a log file versus manually copying and pasting the info from the console?or point me to a direction? Am I missing something?
Hi All,
I have an expression as follows:-
a=`expr ${i} + ${j}` >> $log_file 2>&1
Here, if any of the values i or j or both happens to be empty then the "expr" returns error as
"expr: 0402-050 Syntax error." My problem is I am not able to re-direct this error to the log file. Its is getting... (4 Replies)
Hi,
I have a script to compare 2 files.
file1=$1
file2=$2
num_of_records_file1=`awk ' END { print NR } ' $file1`
num_of_records_file2=`awk ' END { print NR } ' $file2`
i=1
while
do
sed -n "$i"p $file1 > file1_temp
sed -n "$i"p $file2 > file2_temp
diff file1_temp... (5 Replies)
Hi there,
We have 2 apps on our customers machines that can both open files with the same file extension. Is there any way via shell commands to set which application should be the default?
Essentially, I'm hoping to replicate Get Info > Open With > Change All using a shell script, but I just... (0 Replies)
Hello, currently we are executing a .sh from terminal.
The current .sh looks like this:
#!/usr/bin/env bash
/Users/user/my.app/Contents/MacOS/my &
--
Now, we also need to run a third line in the .sh - It's a command line application that I need to run when I execute the above .sh... (0 Replies)
#!/bin/ksh -x
cd /tmp/tj
ftp -n servername.com << DONE
user username password
as
put test.log
quit
close
DONE
echo "testing..."
sh -x scriptname, and it shows all, but username, as, put, quit, close, DONE.
how can i see those ? (1 Reply)
Hi guys,
been scratching round the forums and my mountain of resources.
Maybe I havn't read deep enough
My question is not how sed edits a stream and outputs it to a file, rather something like this below:
I have a .txt with some text in it :rolleyes:
abc:123:xyz
123:abc:987... (7 Replies)
What is the best practice to allow a 3rd party health monitoring app to read the messages file. Since messages is a system file and is owned by root the app cannot read the file. I don't want to run the app as root so how should I allow the app to read the file. The read function is actually built... (2 Replies)
Discussion started by: slwiley
2 Replies
LEARN ABOUT FREEBSD
conscontrol
CONSCONTROL(8) BSD System Manager's Manual CONSCONTROL(8)NAME
conscontrol -- control physical console devices
SYNOPSIS
conscontrol [list]
conscontrol mute on | off
conscontrol add | delete console
conscontrol set | unset console
DESCRIPTION
The conscontrol utility is used to examine and modify the physical devices which back the virtual console devices. If no arguments (or only
the list command) are specified, the current console settings are shown.
There are two types of logical consoles; a high level console which is represented by /dev/console, and a low level console. The low level
console is used for kernel printf(9) and ddb(4) debugger support, while the high level console is used by user programs like syslogd(8).
Multiple device support is implemented only for the low level console; the high level console is set to the first device in the console list.
Multiple console support may be invoked by passing the kernel the -D flag from the boot loader, or by using conscontrol to change the list of
console devices after the system has booted.
The following options are available:
add | delete console
Add or delete a physical device from the logical console. The device must support low-level console operations. Adding a device
will place it at the front of the list of console devices; the first device is used for the high level console.
The console argument is the name of a console device in /dev; the name of the directory may be omitted.
mute on | off
Change the state of console muting. All console output is suppressed when console muting is on.
set | unset console
Set or unset the virtual console. When unset, output from the system, such as the kernel printf(9), always goes out to the real main
console. When set, it goes to another. This is an interface to the tty ioctl TIOCCONS.
SEE ALSO sio(4), syscons(4), tty(4), vt(4), boot(8), loader(8)HISTORY
The conscontrol utility first appeared in FreeBSD 5.0.
AUTHORS
Jonathan Lemon
BSD April 14, 2011 BSD