10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hello,
we have a script that has the two following lines:
ssh -qno StrictHostKeyChecking=no -o ConnectTimeout=1 user@IP 'ls -l /home/opsmgrsvc >/dev/null 2>&1' > /dev/null 2>&1
status="$(echo $?)"
I can't understand what these two lines are doing?
When I execute the first line nothing... (6 Replies)
Discussion started by: greavette
6 Replies
2. UNIX for Dummies Questions & Answers
Hello All,
I was wondering if there is a way to execute a command in my ".bashrc" file based on how I logged into the PC?
I was thinking maybe there is a way to check how the user (*myself) logged in, maybe somehow with the who command along with something else, but I'm not sure... I know I... (7 Replies)
Discussion started by: mrm5102
7 Replies
3. Shell Programming and Scripting
Hi,
I am running below code
For I in $var
do
.......some line of code.......
nohup Sqlplus apps/apps <<EOF &
My_proc($I)
Exit
EOF
done
Nohup and & is used for parallel processing.
Can someone help in determining if the procedure with different arguments
Was called paralley or... (3 Replies)
Discussion started by: Pratiksha Mehra
3 Replies
4. Programming
In shell scripting, I can create a conditional statement based on the success or failure (exit status)of a command such as:
pinger()
{
ping -c 2 $remote_host >/dev/null 2>&1
ping_stat=$?
}
pinger
if ]; then
echo "blahblahblah"
exit 0
fi
how is this done using Python using... (3 Replies)
Discussion started by: metallica1973
3 Replies
5. Shell Programming and Scripting
I would like to search and print a match of the user entered $ARGV.
Im terrible with hashes and really dont know where to go from here.
The example data file
name location phone
Bugs holeintheground 5551212
Woody holeinthetree 6661313
Jerry holeinthewall 7771414... (4 Replies)
Discussion started by: sumguy
4 Replies
6. 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
7. UNIX for Advanced & Expert Users
Hi guys, I need your help to use advance grep command, In my example below, I have 5 container which has some information on it, and I need to grep specific word "PLMNCode=454F00" which will not only grep the line contains that word, but I need to print the output for the whole container.
Input... (6 Replies)
Discussion started by: hapalon
6 Replies
8. Shell Programming and Scripting
Hi !
I would like to be informed by mail when a ping conmand exceeds a certain avarage value.
This is the output of the ping command
rtt min/avg/max/mdev = 164.505/165.522/166.540/1.095 ms
I need to get the second value (165.522) and if greater than 200, send a mail.
This should... (2 Replies)
Discussion started by: gadile
2 Replies
9. Shell Programming and Scripting
hi, i'm trying to write a script to check if the home directories of users are set correctly. below is an extract of the script
here, i am trying to put the name of the owner of the home directory into the variable dirperm (by reading lines in /etc/passwd). however, it seems that when the... (1 Reply)
Discussion started by: roddo90
1 Replies
10. Shell Programming and Scripting
I am piping STDOUT from commands such as ifconfig and dmesg through grep, sed and awk to get the information I need.
I need to now perform some looping and branching now and have been trying to figure out how to do this on the command line.
You may ask "Why the command line? - Why not put it... (2 Replies)
Discussion started by: karlgo
2 Replies