10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
hi,
I am using hp unix server and not getting variable output present inside the while loop. I have tried changing the code and need to verify whether it is proper practice of code. I am expecting the output of varible RUN_FILE 3 to TRUE which i get inside the while loop.
RUN_FILE 1=TRUE... (8 Replies)
Discussion started by: gowthamsoft
8 Replies
2. 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
3. Shell Programming and Scripting
hdr=$(cut -c1 $path$file|head -1)#extract header”H”
trl=$(cut -c|path$file|tail -1)#extract trailer “T”
SplitFile=$(cut -c 50-250 $path 1$newfile |sed'$/ *$//' head -1')# to trim white space and extract table name
If; then # start loop if it is a header
While read I #read file
Do... (4 Replies)
Discussion started by: SwagatikaP1
4 Replies
4. Shell Programming and Scripting
hi, i am running a java script on few thousand files (e1.rnk....en.rnk) but manually,. is there any way to run it automatically by changing the output directory (-out) ?
thanx in advance
ex:
java -jar commands -res /path/e1.rnk -out /path/e1 -gui false
java -jar commands -res /path/e2.rnk... (1 Reply)
Discussion started by: quincyjones
1 Replies
5. UNIX for Dummies Questions & Answers
Hi Fellows,
I was wondering how I can remove first few characters from multiple file names without do loop in unix?
e.g.
water123.xyz
water456.xyz
to
123.xyz
456.xyz
Thanks
Paul
Thanks. (3 Replies)
Discussion started by: Paul Moghadam
3 Replies
6. Shell Programming and Scripting
Hi
Am trying to print the PIDs of process in a file and trying to grep any PID from that file
I set the if condition as $value != "PID" and $value != "-"
Assign that number to a variable
Am confused since am using while loop to read the line from file
and again if condition to check those... (2 Replies)
Discussion started by: Priya Amaresh
2 Replies
7. Shell Programming and Scripting
Is there any FASTEST way to loop a script 10k times
my script works likes this
c-randomnumbers-script -i input1.bed -g g19 -e DB >> output1
I need to run this 10k times by using consecutive outputs to get my final output i.e, output10000
c-random-script -i input1.bed -g g19 -e DB >>... (5 Replies)
Discussion started by: quincyjones
5 Replies
8. 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
9. 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
10. 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