02-10-2015
Oh ok, gotcha... Its just a server/PC that has one user and only 2 of use even know the login so it works for our purposes, thanks.
I did see the "id" command while searching around but it didn't show whether or not the user logged-in remotely or not, but the "who am i" one did... And on a funny note I also came across "who mom likes" which I thought was pretty funny, lol....
By anyway, thanks again for the replies. Much appreciated!
Thanks,
Matt
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
how can i process jobs parallel with conditions below.
Script1.ksh
Script2.ksh
Script3.ksh
Script4.ksh
Script5.ksh
Script6.ksh
Script7.ksh
Script8.ksh
Script9.ksh
Script10.ksh
After successful completion of Script1.ksh I need to run Script7.ksh.
After successful... (4 Replies)
Discussion started by: ford2020
4 Replies
2. Shell Programming and Scripting
Below is my shell script. I am trying to execute two different BTEQ scripts depending on the day of the week. So on a saturday I will execute a certain BTEQ script and on other weekdays I will run the other script.
#!/bin/ksh
dt=`date +"%a"`
if then
bteq > final_output <<- EOF
.run... (3 Replies)
Discussion started by: Mihirjani
3 Replies
3. Shell Programming and Scripting
I need a shell script that will monitor a few conditions and not execute until the these conditions are met. The problem I'm having is that I can not perform a database snapshot (backup) of a sybaseIQ database unless the CPU Status Idle % is above 60% or the snapshot (backup) fails.
If... (2 Replies)
Discussion started by: pancona99
2 Replies
4. Shell Programming and Scripting
Hi All,
I want to echo a message in case a system is reachable by ping or echo a different message in case it's not reachable.
Sample code i wrote is
ping localhost -n 2 | grep 'ttl' > ping_op; ls ping_op > /dev/null && drReachable=Alive; echo -e `date`: \\t "DR server is reachable" >>... (5 Replies)
Discussion started by: Mr. Zer0
5 Replies
5. UNIX for Dummies Questions & Answers
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)
Discussion started by: shruthidwh
2 Replies
6. Shell Programming and Scripting
Hi,
I have a list of files with different filenames like nam0001.txt,pan0001.txt etc coming in /data/inbox from various places.
I needed a shell script which would:-
1)searches for a word from the filenames (coming in inbox directory) provided in input parameter.
2)if found, put in... (2 Replies)
Discussion started by: Saiesh
2 Replies
7. Shell Programming and Scripting
Let me give you a complete example what I am trying to achieve.
1. Below is the log file structure where I need 2,5 and 14th column of the logs after grepping through the linkId=1ddoic.
Log file structure:-
abc.com 20120829001415 127.0.0.1 app none11111 sas 0 0 N clk Mozilla/5.0... (3 Replies)
Discussion started by: kmajumder
3 Replies
8. Shell Programming and Scripting
I have a unix shell script Test.sh
more Test.sh
echo "Calling dbquery1.sh...."
./dbquery1.sh
echo "Calling dbquery2.sh...."
./dbquery2.sh
more dbquery1.sh
sqlplus -s user1/password1@DB_SID @/tmp/storedprocedures/Hello.rcp
I run Test.sh
However, I do not want dbquery2.sh to be... (3 Replies)
Discussion started by: mohtashims
3 Replies
9. Shell Programming and Scripting
for file in File_Name*
do
ed -s $file << 'EOF'
0a
$Header_Record
.
$a
.
w
EOF
done
The above command is executing in the unix box but is not... (2 Replies)
Discussion started by: Kanch
2 Replies
10. Shell Programming and Scripting
Here's an interesting (to me, anyway) little puzzle.
Background:
I have a process that restores a number of large(ish) files from tape backup. As an individual file is being written, it is owned by root, then the ownership is changed when that file is complete. Since this process can take... (3 Replies)
Discussion started by: edstevens
3 Replies
FORTUNE(6) BSD Games Manual FORTUNE(6)
NAME
fortune -- print a random, hopefully interesting, adage
SYNOPSIS
fortune [-aefilosw] [-m pattern] [[N%] file/dir/all]
DESCRIPTION
When fortune is run with no arguments it prints out a random epigram. Epigrams are divided into several categories, where each category is
subdivided into those which are potentially offensive and those which are not. The options are as follows:
-a Choose from all lists of maxims, both offensive and not. (See the -o option for more information on offensive fortunes.)
-e Consider all fortune files to be of equal size (see discussion below on multiple files).
-f Print out the list of files which would be searched, but don't print a fortune.
-l Long dictums only.
-m Print out all fortunes which match the regular expression pattern. See regex(3) for a description of patterns.
-o Choose only from potentially offensive aphorisms. Please, please, please request a potentially offensive fortune if and only if you
believe, deep down in your heart, that you are willing to be offended. (And that if you are, you'll just quit using -o rather than
give us grief about it, okay?)
... let us keep in mind the basic governing philosophy of The Brotherhood, as handsomely summarized in these words: we believe in
healthy, hearty laughter -- at the expense of the whole human race, if needs be. Needs be.
--H. Allen Smith, "Rude Jokes"
-s Short apothegms only.
-i Ignore case for -m patterns.
-w Wait before termination for an amount of time calculated from the number of characters in the message. This is useful if it is exe-
cuted as part of the logout procedure to guarantee that the message can be read before the screen is cleared.
The user may specify alternate sayings. You can specify a specific file, a directory which contains one or more files, or the special word
all which says to use all the standard databases. Any of these may be preceded by a percentage, which is a number N between 0 and 100 inclu-
sive, followed by a %. If it is, there will be a N percent probability that an adage will be picked from that file or directory. If the
percentages do not sum to 100, and there are specifications without percentages, the remaining percent will apply to those files and/or
directories, in which case the probability of selecting from one of them will be based on their relative sizes.
As an example, given two databases funny and not-funny, with funny twice as big, saying
fortune funny not-funny
will get you fortunes out of funny two-thirds of the time. The command
fortune 90% funny 10% not-funny
will pick out 90% of its fortunes from funny (the ``10% not-funny'' is unnecessary, since 10% is all that's left). The -e option says to
consider all files equal; thus
fortune -e
is equivalent to
fortune 50% funny 50% not
-funny
FILES
/usr/share/fortune
SEE ALSO
regex(3), regcmp(3),
BSD
April 19, 1994 BSD