Search Results

Search: Posts Made By: yinyuemi
2,767
Posted By yinyuemi
Hi rdcwayx, your comments is correct, that's...
Hi rdcwayx,
your comments is correct, that's the limitation of my script, it's not robust enough, your code is much better.
Aagin, thanks for your correction.
2,767
Posted By yinyuemi
Thanks for your reply:b: I have modified the...
Thanks for your reply:b:
I have modified the code

#! /bin/awk
{NR>1
{
if($1-var1==1)
{var2=$1}
else
{while (var2<$1-1)
print ++var2":00"}
var2=$1}
{if(/^[0-9]/)
var1=$1}
}1
2,767
Posted By yinyuemi
try: #! /bin/awk { NR>1 { ...
try:
#! /bin/awk
{
NR>1
{
if($1-var1==1)
{
var2=$1
}
else
{while (var2<$1-1)
print ++var2":00"}
}
{if(/^[0-9]/)
var1=$1}
}1
2,767
Posted By yinyuemi
if you want keep the headers in the file just...
if you want keep the headers in the file just make a little change replacing the old code {var1=$1} replaced by this code
/^[0-9]/{var1=$1}
2,767
Posted By yinyuemi
try this way: #! /bin/awk { NR>1 ...
try this way:


#! /bin/awk
{

NR>1
{
if($1-var1==1)
{
var2=$1
}
else
{while (var2<$1)
print ++var2":00"}
}
{var1=$1}
}1
2,767
Posted By yinyuemi
how about this? echo '0:00 Clear weather 29 ...
how about this?
echo '0:00 Clear weather 29
1:00 Clear weather 28
2:00 Clear weather 27
6:00 Clear weather 25
8:00 Clear weather 29
9:00 Clear weather 29
10:00 Clear weather 32
11:00 Clear...
Showing results 1 to 6 of 6

 
All times are GMT -4. The time now is 11:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy