Search Results

Search: Posts Made By: Finja
971
Posted By Finja
while read FILENAME do ls...
while read FILENAME
do
ls /home/distribution/*.${FILENAME}
done</home/distribution/filename
1,581
Posted By Finja
Need to print between patterns AND a few lines before
I need to print out sections (varying numbers of lines) of a file between patterns. That alone is easy enough: sed -n '/START/,/STOP/' I also need the 3 lines BEFORE the start pattern. That alone is...
2,187
Posted By Finja
Need a quick and dirty solution
I have a list of multiple versions of software. The list is formated as follows:

NAME VERSION

I simply need to pull out the highest version of each software, for example:

Original File
a...
6,298
Posted By Finja
Multi-line filtering based on multi-line pattern in a file
I have a file with data records separated by multiple equals signs, as below.

==========
RECORD 1
==========
RECORD 2
DATA LINE
==========
RECORD 3
==========
RECORD 4
DATA LINE...
979
Posted By Finja
The awk solution is awesome. Thanks!
The awk solution is awesome. Thanks!
7,270
Posted By Finja
You have an extra forward slash in your shebang...
You have an extra forward slash in your shebang after expect (highlighted in RED above)...
2,301
Posted By Finja
I'm no guru, and I'm sure there's a one-liner way...
I'm no guru, and I'm sure there's a one-liner way to do it with awk or something, but if pressed for time, here's how I would do it in a shell script:


#!/bin/bash

#first, put each chunk...
979
Posted By Finja
My attempt is FAR too slow
I have numerous (hundreds) of data files with various values in each file. The values are 1 per line, and identified by the fieldname in the 1st field in the line, which is delimited from the actual...
1,229
Posted By Finja
Perfect. Thank you!
Perfect. Thank you!
1,229
Posted By Finja
Any way I could read in the field identifiers...
Any way I could read in the field identifiers from the first line of the file instead of having to specify them? Would like for this statement to work on multiple different files where the records...
1,229
Posted By Finja
Or possibly, if it's easier, could I just print...
Or possibly, if it's easier, could I just print out all records in the following format:

NAME: Jim Smith
ADDRESS: 123 Main Street
PHONE: 999-888-7777

NAME: Bob Jones
ADDRESS: 555 Park...
1,229
Posted By Finja
Need a very specific awk command for parsing records
I have data in a file where the first line of the file identifies the fields. I need to be able to parse out any single record, field-by-field, with the fields identified. So if my file looks like...
Showing results 1 to 12 of 12

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