Comments (1)
The header can be printed with:
pawk -H -B '"name is count"' '"%s is %s" % (name, count)' < input.txt
Do you have a use-case where this wouldn't solve the problem?
Outside very simple cases, having the header as part of the input will just make life more difficult, as you have to explicitly check whether your input is the header or a normal row, and do different things in either case. eg. the above would become:
pawk -H '"name is count" if n == 1 else "%s is %s" % (name, count)' < input.txt
from pawk.
Related Issues (16)
- Please add β--versionβ option HOT 1
- [new feature] add action(s) before the output evaluation on each line HOT 2
- [new feature] auto covert possible column to numerical HOT 5
- "-Bt" prints an extra line at the top HOT 5
- Broken on python 3.8 HOT 1
- Invoke pawk from a python script? HOT 1
- build error: 'pypandoc' has no attribute 'convert' HOT 1
- in place editing HOT 4
- Multiple regex matches HOT 5
- Re-release to PyPI with #16 ? HOT 4
- I broke pawk 0.8.0 π± HOT 3
- Create tag 0.8.1 HOT 1
- Statement in line action not working HOT 3
- Is there a variable holding the header line fileds? HOT 2
- 0 vs 1-based index HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pawk.