Browsed by
Category: bash

shell scripting : seq prints a sequence of numbers

shell scripting : seq prints a sequence of numbers

I often need to execute a loop x times, and I’m just too lazy to write a i++ style algorithm… the command seq is made for me 🙂 Easy to use, just does what I need from it, here’s a extract from the man page : NAME        seq – print a sequence of numbers SYNOPSIS        seq [OPTION]… LAST        seq [OPTION]… FIRST LAST        seq [OPTION]… FIRST INCREMENT LAST So…

Xargs

Xargs

Today I learnt a new command 😀 $ xargs Ok I’m a little bit lying : I knew it before but I was using it only to put several lines into one unique line, like this : $ ls |xargs Now, thanks to the new guy in front of me (the colorblind one), I will be able to replace a lot of “for” and ` ` by xargs 😀

af3de305eb07f5c749d427b137f03040ddd