Search Results

Search: Posts Made By: fastlane3000
2,041
Posted By Jotne
awk '/^Continent/{h=$0;}!/Continent/{print h"...
awk '/^Continent/{h=$0;}!/Continent/{print h" "$0;}'
A small inconsistent with this.
It should be
awk '/^Continent/{h=$0;}!/^Continent/{print h" "$0;}'
or
awk...
2,041
Posted By Yoda
awk '/^Continent/{h=$0;}!/Continent/{print h"...
awk '/^Continent/{h=$0;}!/Continent/{print h" "$0;}' input.txt
3,225
Posted By Don Cragun
Here is one way to do it. This script doesn't...
Here is one way to do it. This script doesn't require sorted input. The required format for the file specifying the names of the columns in the output matrix is described in the comments:...
3,225
Posted By Don Cragun
This will fill in the missing zeros. This...
This will fill in the missing zeros. This doesn't require the input to be sorted, but it does require all entries in the input with the same value for the first field to be adjacent:
awk -F "|"...
3,225
Posted By agama
If your input file is sorted such that the...
If your input file is sorted such that the records with the same first field are always together, then this should work:


awk -F \| '
$1 != last {
if( hold )
print...
Showing results 1 to 5 of 5

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