Search Results

Search: Posts Made By: Liverpaul09
9,514
Posted By Liverpaul09
That works exactly like I want....fantastic!...
That works exactly like I want....fantastic! Thanks:)
9,514
Posted By Liverpaul09
I get the message "tail:: Too many arguments."....
I get the message "tail:: Too many arguments.". Should I be replacing text in your example with text relevant to my example? I'm not familiar with a lot of the syntax.
9,514
Posted By Liverpaul09
awk, extract last line of multiple files
Hi,
I have a directory full of *.txt files. I would like to print the last line of every file to screen.
I know you can use FNR for printing the first line of each file, but how do I access the...
11,504
Posted By Liverpaul09
I'm a newbie aswell;) Thanks for the reply...
I'm a newbie aswell;)

Thanks for the reply but I actually solved the problem while messing around with it:o.

I wrote the following function:
function save_file()
{
printf...
11,504
Posted By Liverpaul09
Using AWK: Extract data from multiple files and output to multiple new files
Hi,
I'd like to process multiple files. For example:
file1.txt
file2.txt
file3.txt

Each file contains several lines of data. I want to extract a piece of data and output it to a new file....
11,106
Posted By Liverpaul09
Ok, I figured it out. The following code works...
Ok, I figured it out. The following code works perfectly:

#!/usr/bin/awk
BEGIN {
print "Starting script...";
}
{
if ( FNR==1 && NR==1 )#
{
printf FILENAME"\t\t"
}
if (...
11,106
Posted By Liverpaul09
It's going to take me a while to understand your...
It's going to take me a while to understand your code before I can fine tune it (I'm a beginner). It's close to being correct, but has a few problems.
- When the script finds the flag "UWI", it...
11,106
Posted By Liverpaul09
That looks much better, the data now looks more...
That looks much better, the data now looks more like this:

Filename1.txt Data1 MoreData1
Filename2.txt Data2 MoreData2
Filename3.txt Data3 MoreData3

However, there's still a problem. I'm...
11,106
Posted By Liverpaul09
I can't be specific with the data, but this...
I can't be specific with the data, but this should give you an idea:

line 1 blah blah
line 2 blah blah
line 3 blah blah
line 4 blah blah
line 5 blah blah
line 6 blah blah
UWI . ...
11,106
Posted By Liverpaul09
AWK, extract data from multiple files
Hi,
I'm using AWK to try to extract data from multiple files (*.txt). The script should look for a flag that occurs at a specific position in each file and it should return the data to the right of...
Showing results 1 to 10 of 10

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