10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I was searching for a way to grep 2 lines before and after a certain keyword, and I came across the following code..
awk "\$0 ~ /ORA-/ {
cmd=\"awk 'NR>=\" NR-2 \" && NR<=\" NR+2 \"' init.ora\"
system(cmd)
}" input_file
I could not understand how this works. What is system() ? what... (2 Replies)
Discussion started by: Kulasekar
2 Replies
2. UNIX for Dummies Questions & Answers
Hi Friend,
what is the equivalent command for batch scripting of tail -1.
for example : i have a.txt file with below the contents. i need to print last line
---------------------------------
Use descriptive thread titles when posting. For example, do not post questions with subjects like... (3 Replies)
Discussion started by: Jewel
3 Replies
3. Shell Programming and Scripting
Hi All,
Actually we want to know the command need to use if the difference between two files are null, then it should not send as mail. Oterwise it should send as mail alert.
Below for your reference,
# Email the spoolfile.
diff free_sp_new.log free_sp_old.log
if output of above... (1 Reply)
Discussion started by: thanvir.akram
1 Replies
4. Shell Programming and Scripting
I want to write 2 scripts that:
script named "users" - List of users logged into the system;
script named "ps" - List of all processes in the operating system;
# is it true?
#!bin/bash
echo 'content-type: text/html'
echo
users # for script named users
#!bin/bash
echo 'content-type:... (15 Replies)
Discussion started by: numeracy
15 Replies
5. Shell Programming and Scripting
Hi all..
can u please let me know how to use the unix shell curl command in PHP scripting,
sample of my code is given below,
<?php
$ch = shell_exec('curl -H "Content-type: application/json" -H "Accept: application/json" --data-binary '{"text" : "how to check the temperature?"}' -H... (5 Replies)
Discussion started by: vidhyaS
5 Replies
6. Shell Programming and Scripting
I have written a few shellscripts to run a videogame (starcraft) at different patched versions. For example bw113 runs the 1.13 version of the game.
These works perfectly when I run them from command line (./bw113). However I cannot get it to work via mouseclick.
Some Information:
- I have... (5 Replies)
Discussion started by: lordsloth
5 Replies
7. Shell Programming and Scripting
Hi,
I need to write a shell script.
Based on command line param to script say demode=yes
Need to run an ant command for an hour(configurable)
Then exit
Again run the ant command
all this needs to be in a loop.
Thanks in advance
Raj (1 Reply)
Discussion started by: rajuak12
1 Replies
8. UNIX for Advanced & Expert Users
Hi All,
I am using the following command to invoke the shell script from a perl command.
perl -i.bak -pe'BEGIN { $cmd = "/opt/coreservices/tomcat-5.5.9/bin/digest.sh -a sha"; }
s/(password=")(*)/
$1.`$cmd $2|cut -d: -f2|tr -d "\n"`
/e
' $CATALINA_HOME/conf/tomcat-users.xml
I need... (1 Reply)
Discussion started by: nua7
1 Replies
9. Shell Programming and Scripting
I have a sript which is going to trigger other 3 scripts in background simultaneously
for eg:
Main Script:(main.sh)
-----------
sh a.sh &
sh b.sh &
sh c.sh &
How to catch the exit status and store it in a variable for all those three scripts in main script. Is there any other way of... (4 Replies)
Discussion started by: Omkumar
4 Replies
10. Shell Programming and Scripting
I am new to Unix scripting. I would like to know if someone can point me to a site which lists any built-in commands in there scripted form. I thought to start with the basics and learn from example.
Thanks
JSP (2 Replies)
Discussion started by: JSP
2 Replies