10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
After the successful start of server, it should check the status again, if it is not running ,it should go through the loop for 2 times.
Even after two times of execution if still the server is not running it should send an alert email. Please help (1 Reply)
Discussion started by: thomas9192
1 Replies
2. Shell Programming and Scripting
Hi,
I want to read file multiple times. Right now i am using while loop but that is not working.
ex.
While read line
do
while read line2
do
echo stmt1
#processing some data based on data.,
done < file2.txt
done < file1.txt # This will have 10... (4 Replies)
Discussion started by: tmalik79
4 Replies
3. UNIX for Advanced & Expert Users
Hi Experts,
I have a code like this.
=====
#include....
int main()
{
int count = 0;
while(1){
printf("\n Interation number is: %d \n ",count);
rv = system(" test.sh > log.txt " );
if (-1 == rv)
{
printf("Could not generate static log: error... (12 Replies)
Discussion started by: binnyjeshan
12 Replies
4. Programming
Hello,
i'm trying to implement the times() function and i'm programming in C.
I'm using the "struct tms" structure which consists of the fields:
The tms_utime structure member is the CPU time charged for the execution of user instructions of the calling process.
The tms_stime structure... (1 Reply)
Discussion started by: g_p
1 Replies
5. Shell Programming and Scripting
#!/bin/sh
count=0
for i in 2 4 6
do
echo "i is $i"
count='expr $count + 1'
done
echo "The loop was executed $count times"
with these scripts
my output is :
i is 2
i is 4
i is 6
The loop was executed expr $count + 1 times
What should I do to get the value instead of 'expr... (17 Replies)
Discussion started by: ymwong
17 Replies
6. Shell Programming and Scripting
Hi,
I have a code as given below
Set -A _Category="A\
B\
C"
for _cat in ${_Category}
do
sed -e "s:<TABLE_NAME>:${_cat}:g" \
-e "s:<date>:${_dt}:g" \
${_home}/skl/sq1.sql >> ${_dest}/del_${_dt}.sql
fi
... (4 Replies)
Discussion started by: mr_manii
4 Replies
7. Shell Programming and Scripting
Hi,
My below output file looks like this.
Backup status at Tue Jul 7 03:30:07 EDT 2009 CMLP
Job Name Last Start Last End ST Run Pri/Xit
____________________________ ____________________ ____________________ __ _______ ___
tnx415uu 07/06/2009 22:01:41 ----- RU 5547800/1
tnp415uu 07/06/2009... (2 Replies)
Discussion started by: intiraju
2 Replies
8. UNIX for Dummies Questions & Answers
I have a source file having 20lacs lines i want to cut first 1 lac lines from source file and redirect to other file (i.e after redirecting the output to other file the source file should have only 19 lacs count ). Pls help me in getting solution.
Thanks in advance. (9 Replies)
Discussion started by: vamshi
9 Replies
9. Shell Programming and Scripting
Please forgive this I think rather basic question.
I have been away from UNIX for a very long time and am in need of some help.
I need to be able to check for the existance of a specific file name say 'file.dat' in a particular location
If the file exists then run a second process (at... (2 Replies)
Discussion started by: JohnCrump
2 Replies
10. Shell Programming and Scripting
I am new to shellscript . PLease help me how can I write the following script.
$ who
ray pts/0 aug 31 01:18 ( 65.169.28.200 )
ray pts/1 sep 2 02:28 ( 65.169.28.200 )
bob pts/3 sep 2 02:31 ( 65.169.28.201 )
when run the command who |./ script , the script should... (3 Replies)
Discussion started by: LAY
3 Replies