Giter VIP home page Giter VIP logo

dotfiles's Introduction

dotfiles

My ~/.bashrc and others.

.bashrc functions and aliases are as follows.

alias or function purpose example prerequisite
latest print the name of the most recently modified file in the current directory latest
listold list the oldest files over 1GB in current directory listold parallel,mawk
clipboard pipe text to clipboard cat foo | clipboard xclip
pdf_subset take a page range from a PDF pdf_subset in.pdf 23-41 out.pdf pdftk
tsv2githubmd cat foo.tsv | tsv2githubmd print a TSV as a GitHub flavored markdown table
parallel cat foo | parallel 'echo {}' make parallel behave like GNU parallel every time parallel
tawk make awk take in TSV and output TSV cat foo.tsv | tawk '{ print $4,$5 }' mawk
pawk make awk take in pipe separated and output pipe separated cat foo.txt | pawk '{ print $4,$5 }' mawk
theader print numbered TSV header cat foo.tsv | theader
cheader print numbered CSV header cat foo.csv | cheader
table2tsv convert any Gnumeric compatible table to TSV cat foo.csv | table2tsv Gnumeric
table2csv convert any CSVKit compatible table to CSV cat foo.tsv | table2csv csvkit
sortfreq print counts of unique values descending cat foo.tsv | tawk '{ print $4 }' | sortfreq
funky_chars return the count for each unique non-alpha non-digit character in the input cat foo.tsv | tawk '{ print $4 }' | funky_chars
trim remove leading and trailing whitespace cat foo | trim
round round numeric field to the nearest n digits cat foo | round 2
awksum sum a single numeric field cat foo.tsv | tawk '{ print $2 }' | awksum
col_extra print records that have content beyond expected number of fields for delimited text col_extra foo.txt 12 "|" parallel,mawk
col_swap switch the position of two columns in delimited text cat foo.tsv | col_swap 3 4 | sponge foo.tsv mawk
col_sort use UNIX sort flags (eg -n or -d) to reorder TSV fields col_sort -n foo.tsv | sponge foo.tsv mawk,csvkit,table2tsv
awkcols format a sequence of numbers as awk columns cols=$(seq 15 1560 | awkcols ); cat foo.tsv | tawk "{ print $awkcols}"
psql_listcols for a PostgreSQL DB, print a TSV of all table names and their corresponding field names psql_listcols my_db parallel,mawk
find_ext find all files under current directory with a given extension find_ext csv
url_encode URL encode text url_encode 'A&P' URI::Escape
url_decode decode URL encoded text url_decode 'A%26P' URI::Escape
html_encode HTML encode text echo '&' | html_encode HTML::Entities
html_decode decode HTML encoded text echo '&' | html_decode HTML::Entities
libretsv force LibreOffice to open TSV as a table libretsv foo.tsv LibreOffice
dumbplot use GNUplot to graph a single numeric field cat foo.tsv | tawk '{ print $4 }' | sed '1d' | dumbplot gnuplot
join_multi_w_singleField print the SQL to join an arbitrary number of tables on a given (identically named) field join_multi_w_singleField "a b c d e f" project_id csvkit
uniqvals given a TSV, return a TSV with the frequency of all unique values shown for each field uniqvals foo.tsv | csvlook -t | less mawk

dotfiles's People

Contributors

albert-decatur avatar

Watchers

James Cloos avatar Alex Kappel avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.