473,396 Members | 1,846 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Whats wrong in this short script

int = a,b;
a=0;
b=-1;
while {a<24;
do
{
a++;
b++;
cd /data/logs/bulk/logs/smpp/2014/05/$a
grep submit_sm fb3* |grep -v submit_sm_resp |cut -d : -f2,3,4 |sort|uniq -c|sort -nr | grep "$a-05-2014 $b:00" >> /data/logs/bulk/logs/smpp/mani/fb3/$a;
} } ;
Jun 17 '14 #1
2 1159
mHealth
13
Expand|Select|Wrap|Line Numbers
  1. while(a<24) {
  2. //write script commands in a separate file say a.sh
  3. //then call 
  4. system("./a.sh");
  5. }
  6.  
You may not even need C code, can manage with script alone.
Jun 17 '14 #2
weaknessforcats
9,208 Expert Mod 8TB
The loop is a do-while and not a while-do.

Expand|Select|Wrap|Line Numbers
  1. do
  2. {
  3.   ....
  4. }while (...);
Jun 17 '14 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Christopher | last post by:
Can someone tell me why this doesn't work? I'm trying to pop a page if someone exits a page and a checkbox is left unchecked. // Start onUnload script// function noBuy(){ if (agree.checked ==...
3
by: Chris Geerdink | last post by:
combo with PHP. what is wrong with the Javascript? else { include("mysql.php"); $query1 = mysql_query("INSERT INTO gbook (naam, email, text) VALUES ('".$_POST."', '".$_POST."',...
1
by: Steve1 via DotNetMonster.com | last post by:
Hi all, Why is the last line of this code snippit pulling up with an error? Any help will be appreciated - Thanks, Steve. string str_SQLLayoutsPound = "SELECT * FROM Layouts ORDER BY Name";...
3
by: mahsa | last post by:
Hi do you know whats wrong with this code? <asp:HyperLink id="HLink_Help" runat="server" NavigateUrl='<%# "javascript:window.open('comments.aspx?id=1,width=500,height=600, scrollBars=yes');"...
1
by: '~=_Slawek_=~' | last post by:
$DOW = (jddayofweek(unixtojd(mktime(1, 1, 1, $month, $day, $year)))+6)%7; $DOW= (jddayofweek(juliantojd($month, $day, $year))+6)%7; The results are supposed to be the same, but they are not....
7
by: Mike Barnard | last post by:
It's a simple test... VERY SIMPLE. But... In an external stlyesheet some attributes don't show. With the same styles cut and pasted to the test internally it works as expected. Anyone tell...
1
by: Varun Gupta | last post by:
PATH="/clocal/mqbrkrs/user/mqsiadm/sanjay/" MAIL_RECIPIENTS="rb903@dcx.com" Subject="File accessed in last minutes:" find "$PATH" -type f -amin -1 > temp.txt.$$ cat temp.txt.$$ | \ while read...
5
by: islayer | last post by:
can someone tell me what is wrong with the bold code? i am just learning perl. the program should create a perl file with a random name (5 letters, followed by a number), but the name is always just...
5
by: hiqu | last post by:
This issue is driving me nuts and not able to figure out whats wrong. I've this code in my firefox extension. Firefox always hangs and reports the script is busy. if I introduce a break...
1
by: mslimp | last post by:
Hello, I'm a bit new to Perl so I was hoping someone with experience could give me a quick answer. Question: The following script changes the date from today's date to (today's date+6 months). ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.