Tag Archives: END

Trips to the Tomb

passion-week1.jpg

For centuries there has been much confusion when people try to reason the different accounts of Jesus’ resurrection as recorded by the apostles. The fact that they all seem to have a different story to tell does not help. Perhaps, a good way to consider their seemingly different reports is to view them like transparent overlays, similar to the one’s we have seen in books showing the skeleton, then the nerves and blood vessels, organs, muscular and finally the skin and hair.

The Gospels, similarly, are each reporting different events which had taken place around a major singular occurrence, the resurrection of Jesus Christ. The fact is that these different events are recorded in God’s word and are therefore true. Perhaps the answer to the confusion is to consider that there were multiple trips made to the tomb.

The best way to determine the possible order of these trips to the tomb is to consider the different details that have been given about the time of day and light of the sun. Was the sun going down or coming up? These questions are actually quite easy to answer. However, we must remember that the Sabbath, like all the other biblical days, began and ended with sundown, see Gen. 1:5, 8, 13, 19, 23, 31 and Lev. 23:32.

Matthew clearly tells us that when the two Marys where first headed to the tomb it was “IN the end of the Sabbath.” Therefore, according to Matthew this trip took place Saturday evening prior to sunset, “IN the end of the Sabbath, as it began to dawn toward the first day of the week.”

The word translated “end” is the Greek word “opse,” # 3697 in Strongs Concordance. It means – late in the day; by extension, after the close of the day: –(at) even, in the end. The translated phrase “as it began to dawn toward the first day of the week” adds to the confusion of most people and caused them to think Matthew is talking about the sunrise, or “dawn” as we would refer to it. The Greek word here was translated “dawn,” while at times a correct translation, is not however of necessity the intent original. The implication of the word, since it follows “opse,” properly means to “draw on,” or, “as the first day approached,” without specifying a precise time. As a matter of fact, that is exactly how the same word here translated “dawn” is translated in Luke 23:54, “And that day was the preparation, and the sabbath drew on.”

In English the word “dawn” is frequently used to mean the beginning of something – like “the dawn of space travel” would be a reference to the first flight of man in space. This careful chronological statement, “IN the END of the Sabbath, as it began to dawn toward the first day of …read more

Source: Worthy Christian Forums

In Shell Script Does Second Command Wait For First Command To Complete

By angshuman

Hi All,

I have a question related to Shell scripting. In my shell script, I have following two commands in sequence:

Code:

sed 's/^/grep "^120" /g' $ORIGCHARGEDAMTLIST|sed "s;$;| cut -f$FIELD_NO1 -d '|' | awk '{ sum+=$1} END {printf ("%0.2f\n", sum/100)}' >$TEMPFILE

mv $TEMPFILE $ORIGFILE


The first command is operating on large number of data like 20k. Will it be possible that the second command is executed and rename the temporary file to original file name before the first operation is completed.

Thanks
Angshuman

…read more

Source: FULL ARTICLE at The UNIX and Linux Forums

Count and print the number of occurences

By arch

I have some files as shown below

GLL ALK 654-656 654 656
SEM LYG 655-657 655 657
SEM LYG 655-657 655 657
ALM ARN 656-658 656 658
ALM ARN 656-658 656 658
ALM ARN 656-658 656 658
LEG LEG 658-660 658 660
LEG LEG 658-660 658 660

The value of GLL is 654. Th value of ALK is 656. In the same way, 4th column represents the values of first column. 5th column represents the values of second column.

I tried the following program to count the occurrences of each number in the fourth and fifth column.

for i in folder1/*.pdb;
do
awk ‘
BEGIN {
path=sprintf(“%s”, “/home/arch/Desktop/folder2/”)
}
!s[1″:”$4″:”$5]++{sU[$4]++;tot++}
!s[2″:”$4″:”$5]++{sU[$5]++;tot++}
END {
sub(/.*//,””,FILENAME)
for (x in sU)
print x, sU[x], sU[$1] > path FILENAME;
}’ $i;
done

The above program prints as follows

660 1
654 1
655 1
656 2
657 1
658 2

But I would like to get the output as follows

660 LEG 1
654 GLL 1
655 SEM 1
656 ALM 2
657 LYG 1
658 LEG 2

your suggestions would be appreciated!!

…read more

Source: FULL ARTICLE at The UNIX and Linux Forums

Looking to improve the output of this awk one-liner

By DeCoTwc

I have the following awk one-liner I came up with last night to gather some data. and it works pretty well (apologies, I’m quite new with awk, and don’t know how to format this pretty-printed). You can see the output with it.

Code:

awk '{if ($8 == 41015 && $21 == "requests") arr["Requests "$1" "substr($2,0,5)]+=$20;if ($8 == 41015 && $22 == "requests") arr["Requests "$1" "substr($2,0,5)]+=$21;else if ($8 == 41100) arr["Deletes "$1" "substr($2,0,5)]+=1;if ($8 == 41015) arr["Batches "$1" "substr($2,0,5)]+=1};END{for (i in arr) print i,arr[i]}' example.log


My input file for this example: (this is uniq’d but there are 75 lines total)

Code:

07/19/13 07:50:27.890 D COMPANY_NAME Manager Proxy MGR_PROXY 41100 @BOX-98765 Manager DoD with RSDVR asset 1508772769 of home 7793004 found in 0 retries
07/19/13 07:50:28.247 I COMPANY_NAME Manager Proxy USER_OPER 41015 @12345 Schedule recording request: RSDVR recording requested asset 7474656, channel VH1S, 60 requests
07/19/13 07:53:04.319 I COMPANY_NAME Manager Proxy USER_OPER 41015 @54321 Schedule recording request: RSDVR recording requested asset 61263854, channel HG HD, 1 requess
07/19/13 07:53:04.319 I COMPANY_NAME Manager Proxy USER_OPER 41015 @54321 Schedule recording request: RSDVR recording requested asset 61263854, channel HG HD, 1 requests


and my output is:

Code:

Batches 07/19/13 07:50 25
Requests 07/19/13 07:50 1500
Deletes 07/19/13 07:50 25
Batches 07/19/13 07:53 25
Requests 07/19/13 07:53 25


The code logic is pretty simple:

Code:

* Check 8th column which denotes log line type
* If 41015 (a recording request)
+ increment up the batch counter by one.
+ find the column with the number of requests and increment the requests counter by that value
* if 41100
+ increment the deletion counter up one.


My primary objective is to format the output as a CSV that I can just send off as a report like this (the headers are illustrative, and I’m not looking to actually print them out…unless I can). :

Code:

#Date,Time,Reqs,Bats,Dels
07/19/13,07:50,1500,25,25
07/19/13,07:53,24,25,


My secondary objective is to clean up the code. For example, having to check the 8th column twice for 41015 to increment both counters seems wasteful.

Any advice is welcome, but please keep in mind this is my first time doing anything more complex than awk ‘{print $2,$4,$8}’ file, so I’d appreciate explanations as well as code snippets.

…read more

Source: FULL ARTICLE at The UNIX and Linux Forums

awk not working for calculating no of lines with criteria

By siramitsharma

I have tar.gz file and i want to count the lines which are matching the criteria as well as which are not matching the criteria. Following is the code

Output Requirement:
Match the input from zcat with 26th filed having 02 value, in case it matches then print the output in a file & increase the match counter by 1 & in case it doesnt matches then increase the not match counter. At last i have 2 files one having the records in a.txt file & another file having match counter & not match counter values.

But this is not working, please help

Code:

zcat filename.tar.gz | awk -v mon="07" '
BEGIN {
if (( (substr($0,26,2)=="02") && substr($0,84,2) == month ))
print $0 >> "a.txt"
++matchcounter
else
++notmatch
;}
END { print matchcounter","notmatch >> "countfile"}
'


…read more

Source: FULL ARTICLE at The UNIX and Linux Forums

Pass awk array variable to shell

By littlewenwen

Hi, all

suppose I have following myfile (delimited by tab)

Code:

aa bb
cc dd
ee ff


and I have following awk command:

Code:

awk 'BEGIN{FS="t"}{AwkArrayVar_1[x++]=$1;AwkArrayVar_2[y++]=$2};END{for(i=0; i<NR; i++) print i, AwkArrayVar_1[i], AwkArrayVar_2[i],}' myfile


My question is: how can I assign the awk array variable to shell array variable, such as ShellArrayVar_1 = AwkArrayVar_1, and ShellArrayVar_2 = AwkArrayVar_2?

From: http://www.unix.com/shell-programming-scripting/221659-pass-awk-array-variable-shell.html

Problem with Regular expression in awk

By meetsriharsha

Hi,
I have a file with two fields in it as shown below

Code:

14,30
28,30
16,30
22,30
21,30
3,30


Fields are separated by comma “,”.
I’ve been trying to validate the file based on the condition “each field must be a numeric value”

I am using HP-UX OS.

I have tried the following awk commands but none works.

Code:

echo "14,14" | awk -F"," '$1 != /[:digit:]/ || $2 != /[:digit:]/ {a=1;} END{if(a==1) print "Error in file descriptor file";}'


Code:

echo "14,14" | awk -F"," '$1 != /[[:digit:]]/ || $2 != /[[:digit:]]/ {a=1;print $0;} END{if(a==1) print "Error in file descriptor file";}'


Code:

echo "14,14" | awk -F"," '$1 !~ /^[1-9]*$/ || $1 ~ /^$/ || $2 !~ /^[1-9]*$/ || $2 ~ /^$/ {a=1;} END{if(a==1) print "Error in file descriptor file"}'


The above commands are displaying the error message even if the file is in the correct format.
Please help me on this.

From: http://www.unix.com/shell-programming-scripting/221559-problem-regular-expression-awk.html

Remarks by the First Lady at Lunch With Midshipmen at the United States Naval Academy

By The White House

U.S. Naval Academy
Annapolis, Maryland

12:17 P.M. EDT

MRS. OBAMA: Thank you so much. (Applause.) Well, since I know I'm the only thing that stands between you and your 20-minute meal, I'm not going to take long. But it is a pleasure and an honor to be back here at the United States Naval Academy.

I was here a couple of years ago when we first came into office; I brought Sasha, and it was an amazing experience. Sasha is our youngest daughter and she was just taken by the experience. And I'm not sure yet, she's just 11 — I'm not sure where her trajectory will lead her — but this is an amazing place, and you all are an amazing group of men and women. We are incredibly proud of you.

I want to congratulate you on winning the Commander-In-Chief's trophy. Go Navy! (Applause.) Well done. And I know that my husband will be here in May for your commencement, so I am particularly pleased that I get a chance to stop by and say hello, but, more importantly, to thank you for your service and your sacrifice.

The degree of discipline and rigor that it takes to do what you do is truly amazing. And Barack and I, we are so proud of you all. And we know you are some of the best and brightest that this country has to offer, and it's just important that you know that you have a President and a First Lady who will keep working to make sure that this country serves you as well as you serve us.

So with that, I bid you a wonderful, delicious lunch — I see a lot of greens on the plate, which is good. And congratulations on how far you've come, and I look forward to the leadership that you will exhibit in the years to come.

God bless you all. (Applause.)

END
12:20 P.M. EDT

From: http://www.whitehouse.gov/the-press-office/2013/04/17/remarks-first-lady-lunch-midshipmen-united-states-naval-academy

How to pass bash variable inside EOF?

By Akshay Hegde

Hi all I am trying to generate some program using following command

Code:

n=1
for file in `ls *.txt | sort -t"-" -k2n,2`;do

nc=`awk 'END{print NR}' $file`

cat >program_$n.xyz<<EOF

let linecount = $nc

some more commands

EOF

n=`expr $n+1`
done


here my problem is

Code:

$nc


inside

Code:

EOF


is not working, those who have solution kindly help me.

Source: FULL ARTICLE at The UNIX and Linux Forums

awk to find the max

By sathyaonnuix

Experts,
Here is my question.
I have got file like below

Code:

# cat file
XYZb,24,26,6
XYZc,24,26,6
XYZe,24,25,5
XYZf,23,29,5
XYZi,16,25,5
XYZj,24,26,7
XYZn,17,23,4
XYZz,23,29,5


Now, I want to print the line’s Column1[delimitor is ,] whose Column 3 is the max of all.

My code is

Code:

awk -F',' 'BEGIN {max = 0;} {if ($3>max) {max=$3;server=$1}} END {print server}' file


But, If there are more than 1 row contain the same max value, my snippet is printing only the last one. Please help.

Here my expected output is XYZf,XYZz.

PS: I want to get this accomplished with awk

…read more

Source: FULL ARTICLE at The UNIX and Linux Forums

Remarks by the First Lady at Kitchen Garden Planting Event

By The White House

White House Kitchen Garden

1:16 P.M. EDT
MRS. OBAMA: How are you guys doing?

CHILDREN: Good.

MRS. OBAMA: Is it a little chilly?

CHILDREN: Yes.

MRS. OBAMA: Where are your jackets? I'm going to be the mother. Where are your jackets? (Laughter.) All right, so we're going to put you to work.

Well, welcome. This is the fifth planting of the White House Kitchen Garden. Are you guys excited?

CHILDREN: Yes.

MRS. OBAMA: So that we know who is here, I want to make sure that all these wonderful people with their cameras know which schools are here. So when I say your school name, raise your hand, or scream or something like that.

Milton Elementary School from Milton, Vermont. Woo-hoo! Yes, is that the principal? It's like woo-hoo, party on. Sarah Moore Greene Magnet Technology Academy in Knox County, Tennessee. Woo-hoo! (Applause.) Arthur D. Healey School, Somerville Public Schools in Somerville, Massachusetts. Woo-hoo! (Applause.) Benjamin David Gullett Elementary School in Bradenton, Florida. (Applause.) Yes, that was it. That was it. I know you all are cold, coming from Florida. And then we have our partners from many, many, many years — Bancroft Elementary School. (Applause.) There we go. See, they're comfortable yelling in the White House. (Laughter.) And then we have the Harriet Tubman Elementary School students. (Applause.)

So it's great to have you guys here. Are you ready to go? One of the reasons we invited these schools — Harriet Tubman School and Bancroft, they have been our partners for years. But the schools from across the country who have come, you guys are here because you are doing such wonderful things to implement the new school nutrition standards at your school. So do you like your school lunches? They are healthy and they are good? And you're eating your vegetables? And many of you have gardens of your own? Awesome. So you know what to do here, right? Are you ready to plant?

All right, let's get going. Let's do it!

END
1:18 P.M. EDT

…read more

Source: FULL ARTICLE at The White House Press Office

Display Additional Variable string in awk print command

By ckwan

Hi all,
I have script to monitor and sum up the total memory use up for each individual process.

proc=$1
svmon -P -O summary=basic,unit=MB|awk ‘NR>4’|grep -w “${proc}” |awk ‘{sum+=$3} END {printf “t” sum “””n”;}’

But I would like the script to be able to display as following

Execute
——
./script java

Output
—–
java -> 1233

Can anyone has bright idea on this ?

Thanks.

…read more

Source: FULL ARTICLE at The UNIX and Linux Forums

Remarks by the President and First Lady at the 2013 White House Easter Egg Roll

By The White House

10:48 A.M. EDT
THE PRESIDENT: This is Jessica Sanchez, everybody! Give her a big round of applause. (Applause.) Kid President — give Kid President a big round of applause. (Applause.) The Easter Bunny is here. Give the Easter Bunny a big round of applause. (Applause.)
It is wonderful to see all of you. And I just want to say welcome. You guys brought the great weather. It was a little shaky this morning, but all of you did a great job sending a message upstairs, and now we’ve got beautiful weather.
And I now want to introduce the star of the Obama family, my wife, the First Lady, Michelle Obama. (Applause.)
MRS. OBAMA: Thank you, Mr. President. Thank you, Kid President, Robbie Novak. Isn’t he wonderful? (Applause.) Robbie, we’re so proud to have you here. You have been so inspiring. I can’t imagine that there’s anyone who hasn’t seen your video, right? You make us all want to work hard and be better. That’s right. So you’re going to spend a little time in the Oval Office just fixing things up for this President, aren’t you? All right, well, it’s good to have you here.
And it’s great to have everyone here this morning. We are so excited. The Easter Egg Roll is the biggest event that we have here on the South Lawn of the White House each year. Today we’re going to have more than 30,000 people who will pass through this yard in celebration of nutrition and health and activity. And we could not do this if it were not for all of our wonderful volunteers, our staff, all of the terrific performers and athletes who have taken time out of their lives and their busy days to make this important. So we need to give all of them a round of applause for all their hard work. (Applause.) Yes, indeed!
So today, we want you to have a great time. We want you to run around. We want you to go over and see the White House Garden. We want you to learn about making tasty, healthy food. We’re going to come down and do some Easter egg roll. We’re going to read some stories. But overall, we want you guys to have a good time and keep moving and be healthy. And, kids, eat your vegetables, okay?
All right, you all, take care. We’ll see you down there. Bye-bye. Thank you. (Applause.)
10:51 A.M. EDT

…read more
Source: FULL ARTICLE at The White House Press Office

Finding maximum occurrence value using awk

By meet77

Hi everyone, I’m a new member at the forum
I have a file like this: field 2 values are either 0 or negative. file test4:

100815 -20
118125 0
143616 0
154488 0
154488 0
154488 -6
196492 -5
196492 -9
196492 -7
27332 0
29397 0

I would like to print a line containing the maximum value in field 2 of all occurrences for each value in field 1. So the desired output should be:

100815 -20
118125 0
143616 0
154488 0
196492 -5
27332 0
29397 0

I am using awk to do this. But, there are two problems: first awk prints nothing when I try to get the maximum for the values with negative numbers but it has no problem when I try the same with positive numbers. This made me take the absolute values which I can later turn back to the original values. The second problem, I get the following output with my code:

100815 20
118125 0
143616 0
154488 6
196492 7
27332 0
29397 0

Although with absolute values I should get:

100815 20
118125 0
143616 0
154488 0
196492 5
27332 0
29397 0

My code is:

awk ‘{$2>0?$2=$2:$2=-$2} $2==0 {$2=0} {print}’ test4 | awk ‘NR==1 {a[$1]=$2} {a[$1]=$2 ; if ($2<a[$1]) a[$1]=$2; else a[$1]=a[$1];} END {for(i in a) print i"t"a[i];}'

I am sure I’m missing something basic and this could probably be done in a much simpler way. Any help is appreciated
Best reagrds to all

…read more
Source: FULL ARTICLE at The UNIX and Linux Forums

Remarks by the President at Swearing-in Ceremony of Julia Pierson as the Director of the U.S. Secret Service

By The White House

Oval Office

3:16 P.M. EDT

(The Vice President administers the oath to Ms. Pierson.)

THE VICE PRESIDENT: Congratulations.

THE PRESIDENT: Great job.

MS. PIERSON: Thank you very much, Mr. President.

THE PRESIDENT: Thank you so much. Well, listen, I have to say that Julia’s reputation within the Service is extraordinary. She’s come up through the ranks. She’s done just about every job there is to do at the Secret Service.

Obviously, she’s breaking the mold in terms of directors of the agency, and I think that people are all extraordinarily proud of her. And we have the greatest confidence in the wonderful task that lies ahead and very confident that she is going to do a great job. So we just want to say congratulations.

As Joe Biden pointed out, this person now probably has more control over our lives than anyone else — (laughter) — except for our spouses. And I couldn’t be placing our lives in better hands than Julia’s.

THE VICE PRESIDENT: And my agents are excited that we picked her.

THE PRESIDENT: Absolutely. You’re going to do a great job.

Q How did you make your decision?

THE PRESIDENT: She has extraordinary qualifications, and I think a lot of people who have worked with Julia know how dedicated, how professional, how committed she is, and I think are absolutely certain that she’s going to thrive in this job.

Thank you, guys.

Q How are you feeling about your bracket, sir?

THE PRESIDENT: Busted. (Laughter.) I think my women’s bracket is doing much better than my men’s bracket.

END
3:18 P.M. EDT

…read more
Source: FULL ARTICLE at The White House Press Office

How to deal with multidimensional array in awk?

By Akshay Hegde

Hi all!

I would like to know how to print

Code:

$0


when using multidimensional array like below

time being I am using for loop to print columns like this

Code:

awk 'FNR==1{i++}
{for(k=1;k<=NF;k++)A[i,FNR,k]=$k}
END{for(j=1;j<=25;j++)
print A[2,1,1],A[2,1,2],A[2,j,3],A[2,j,4],A[2,j,1],A[2,j,2],A[2,j,3],A[2,j,4],A[1,j,1],A[1,j,1],A[1,j,2],A[1,j,3],A[1,j,4],A[1,j,1]}' file1 file2


so here my problem is I have more than 15 column that means whether I have to type like below till 15th column

Code:

A[2,j,1],A[2,j,2],.....A[2,j,15]


or any other solution is available ?

thanks in advance

…read more
Source: FULL ARTICLE at The UNIX and Linux Forums

Help summing a file using awk

By Drenhead

I’m trying to sum a text file using AWK. Here is an example of the file:

Code:

600|3H68| 46
600|3H69| 46
600|3H6F| 290
600|3H6G| 24
600|3HDY| 1
600|3HDY| 3
600|3HE0| 1
600|3HE0| 3


I would like to sum the third field if the first two fields are the same.

For example, the last 2 lines, I would like them to sum up and have
600|3HE0| 4

Is this possible using AWK?

I tried something like this, but it gave strange results:

Code:

awk 'BEGIN { FS = "|" } ; '{ arr[$1 "|" $2] += $3 } END {for (i in arr) {print i "|" arr[i] } }' count_all.txt


I appreciate any help you can provide.

…read more
Source: FULL ARTICLE at The UNIX and Linux Forums