10 More Discussions You Might Find Interesting
1. 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
2. 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
3. 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
4. Shell Programming and Scripting
Hi, I have a very large file I want to extract lines from. I'm hoping Grep can do the job, but I'm running into problems.
I want to return all lines that match a pattern. However, if the following line of a matched line contains the word "Raw" I want to return that line as well.
Is this... (3 Replies)
Discussion started by: redbluefish
3 Replies
5. Shell Programming and Scripting
Please see the script segment below
for i in $files
do
echo $i
if ; then
case "$1" in
"IE0263"|"IE0264"|"IE0267"|"IE0268")
short_filename=`ls -l $i | cut -c108-136 | sort`
;;
"IE0272"|"IE0273")
short_filename=`ls -l $i | cut... (4 Replies)
Discussion started by: jmahal
4 Replies
6. Programming
Hi,
I have to find jar file name and its path by passing it containing class file name, jar is a kind of zip.
by using following command I am able to get jar file name by passing class file name.
find -name "*.jar" -exec grep "CLASSNAME" {} \;
find -name "*.jar" -exec grep... (3 Replies)
Discussion started by: niceboykunal123
3 Replies
7. Shell Programming and Scripting
Hello,
I have to runt he following VMWARE script to take a snap shot of my machine:
vmware-cmd -v /vmfs/volumes/44e9c20f-71ded630-3ac2-00137221e12a/orion/orion.vmx createsnapshot Weekly_Backup
I need to check if successfully executes or not so I thought I would put it in a IF STATEMENT
... (2 Replies)
Discussion started by: mojoman
2 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. UNIX for Advanced & Expert Users
Hi to all,
I have one doubt in unix/linux installation. There are two systems in which one is Sparc system having no CD-Rom, No O/S and fresh Hard disk and another system is having windows O/S. Now, can i install unix or linux o/s in the Empty Sparc System by using other system which is... (1 Reply)
Discussion started by: sasidarvarma
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