9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Pattern:
Mary walks at the park every day with her children
sed 's/$/ /'
will make it add 1 space at the end (trailing)
I want to add X ($VARIABLE) number of spaces (which comes from RANDOM)
i.e.
VARIABLE='14'
then it will do:
sed 's/$/ /'
= 14 spaces added at the... (10 Replies)
Discussion started by: holyearth
10 Replies
2. Shell Programming and Scripting
Hi,
I am trying to get lines between the last occurrences of two patterns. I have files that have several occurrences of “Standard” and “Visual”. I will like to get the lines between “Standard” and “Visual” but I only want to retain only the last one e.g.
Standard
Some words
Some words
Some... (4 Replies)
Discussion started by: damanidada
4 Replies
3. 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
4. Shell Programming and Scripting
Hi,
I'm trying to create an XML sitemap of our dynamic ecommerce sites SEO Friendly URLs and am trying to create the initial page listing.
I have a CSV file that looks like the following and need duplicate the lines based on a value which needs calculating.
... (2 Replies)
Discussion started by: jamesfx
2 Replies
5. Shell Programming and Scripting
All,
I have a test file as specified below. 1st col is <arrival time> and 2nd col is <Page #>. I want to find the inter-arrival time of requests for each page # (I've done this part already). Once I have this, I want to calculate the average interarrival time. Note, that I am trying to have the... (11 Replies)
Discussion started by: jontjioe
11 Replies
6. Shell Programming and Scripting
By "many many times" I mean the times the input file is to be processed is unknown beforehand, it will be known when awk finishes processing the input file for the first time.
So my question is: how to start over again from the first record of the input file when AWK finishes processing the... (7 Replies)
Discussion started by: kevintse
7 Replies
7. Shell Programming and Scripting
Hi everyone,
I was wondering if it's possible to read a file ("file2" in my example) more than once. In this example I want to print file2 entirely for each lines of file1:
awk -F$'\t' '{
print $0
while ((getline < "file2") > 0) {
print "\t"$0
}
}' file1
It... (4 Replies)
Discussion started by: anthony.cros
4 Replies
8. Shell Programming and Scripting
Not sure about the title if someone has a better name for it please lemme know and I will edit the title.
I have several (10+ files) which look something like:
File 1:
12/28/2009 04:0 8
12/28/2009 04:4 4
12/28/2009 05:0 4
.
.
.
File 2:
12/28/2009 04:1 7
12/28/2009 04:2 3... (2 Replies)
Discussion started by: jstrangfeld
2 Replies
9. Shell Programming and Scripting
How can I print a '-' on the same line within awk, say 50 times, without actually typing '-' 50 times?
Cheers (3 Replies)
Discussion started by: dbrundrett
3 Replies