How can I compare two decimal values within a function using Bash? Function fun2 isn't comparing the decimal values. Is there a way to do this using Bash or Korn?
#!/bin/bash
set -x
x=1
z=110
function fun1() { i=`bc << EOF 2>> /dev/null
scale=3
... (1 Reply)
Hi
I want to know if the email address in the mailx exists or not
Eg:
Mailx -s "Subj" hello@ab.com
How do I know if the email address is a valid one??? (4 Replies)
New to scripting in general, so patience plz. If I ask a stupid question or don't get it, I thank you for your kindness in advance.
That said, did a for i loops checks to see if a PB* file is there but I need to know two things before I copy the file.
I need to know if the file's create date... (2 Replies)
I want to be able to access an environment variable to control how a program is compiled.
So:
export MY_VERSN=9
Then ideally, within my C++ code, I would have
#if MY_VERSN = 9
iret = FRED9()
#else
iret = FRED()
#endif
The way I thought I could do it is that in the script that... (2 Replies)
Hi guys.I'm just beginner of python.
I'm just trying to do some analysis on simple input file.
it has 6 columns and i want to consider k,l and m,n if i and j are +
after that checking which value is greater or lower in k,l and m,n
I have included logic header just to explain what I was... (4 Replies)
Hi Guys!
Anybody know how can I use a nawk or awk on a script and printing the NAME, SECTION (must be 410 or 411 or 414) and TOTAL COST of CLASS 1 and 3 combined must be greater than 50. See below desired output file.
input.txt:
NAME,CLASS,COST,SECTION
JOHN,1,10,410
JOHN,2,20,410... (2 Replies)
Hi ,
I have a script which has multiple awk and sed commands like below.
First one :-
find /root/src/ -name "*csv" -size 0 -exec rm {} \;
Second one: -
ls *SRE*.txt > SRT_TRAN.dat
rm *asr*.txt
Third one :-
find /root/src/ -name '*.csv' | while read FILENAME ;
do
awk... (2 Replies)
How do i check success status of a sed command execution i have the below script not sure if it is right approach to check status of execution using a function.
Also it looks like in the below sed command even if the search string doesn't exist in the file it is returning status as success as i... (6 Replies)
Hi Team ,
I have one Master.sh file which call X,Y,Z scripts ,
but here X may call again some sub scripts X_sub1.sh , X_sub2.sh
Y calls Y_sub1.sh,Y_sub2.sh and similarly Z script also .
Now requirement is Both X and Y should execute parallel bcz X and Y are independent... (9 Replies)
Hello All,
I have some files like file, file.chk, file.sem and file.temp in huge. I would like to delete some files based on following criteria.
1. Unconditionally delete .sem and .temp files
2. If we found the actual file, don't remove .chk file, otherwise remove .chk file as well
for... (5 Replies)
Discussion started by: VasuKukkapalli
5 Replies
LEARN ABOUT MOJAVE
launchd
launchd(8) BSD System Manager's Manual launchd(8)NAME
launchd -- System wide and per-user daemon/agent manager
DESCRIPTION
launchd manages processes, both for the system as a whole and for individual users.
The primary and preferred interface to launchd is via the launchctl(1) tool which (among other options) allows the user or administrator to
load and unload jobs. Where possible, it is preferable for jobs to launch on demand based on criteria specified in their respective configu-
ration files.
launchd also manages XPC services that are bundled within applications and frameworks on the system.
During boot launchd is invoked by the kernel to run as the first process on the system and to further bootstrap the rest of the system.
You cannot invoke launchd directly.
NOTES
On Darwin operating systems, the canonical way to launch a daemon is through launchd as opposed to traditional POSIX and POSIX-like mecha-
nisms or mechanisms provided in earlier versions of OS X. These alternate methods should be considered deprecated and not suitable for new
projects.
In the launchd lexicon, a daemon is, by definition, a system-wide service of which there is one instance for all clients. An agent is a ser-
vice that runs on a per-user basis. Daemons should not attempt to display UI or interact directly with a user's login session. Any and all
work that involves interacting with a user should be done through agents.
XPC services which are marked with a ServiceType of System are functionally equivalent to daemons and run in the same environment, sharing
the same Mach bootstrap namespace. XPC services which are marked with a ServiceType of User are equivalent to agents with the LimitLoadToSes-
sionType key specifying the Background session and run in the same environment, sharing the same Mach bootstrap namespace. See
launchd.plist(5) for more information about user sessions.
On Darwin platforms, a user environment includes a specific Mach bootstrap subset, audit session and other characteristics not recognized by
POSIX. Therefore, making the appropriate setuid(2) and setgid(2) system calls is not sufficient to completely assume the identity for a
given user. Running a service as a launchd agent or a per-user XPC service is the only way to run a process with a complete identity of that
user.
FILES
~/Library/LaunchAgents Per-user agents provided by the user.
/Library/LaunchAgents Per-user agents provided by the administrator.
/Library/LaunchDaemons System-wide daemons provided by the administrator.
/System/Library/LaunchAgents Per-user agents provided by Apple.
/System/Library/LaunchDaemons System-wide daemons provided by Apple.
SEE ALSO launchctl(1), launchd.plist(5),
DEVELOPER DOCUMENTATION
The Daemons and Services Programming Guide can be found at the following URL:
https://developer.apple.com/library/content/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/Introduction.html
Darwin 25 November, 2013 Darwin