Browsed by
Tag: bash

My top 20 linux favourite commands

My top 20 linux favourite commands

Here’s my linux favourite commands, by type : Scripting 1. egrep : aaah… if I had to keep only one, this would be the one I’d choose… can’t spend 10 minutes without using it. 2. sed : because I always need to replace something by something else 10 times on each line in huge files 3. xargs : helps me avoid the for loop, shorter to write, easier to remember and understand when you find it in history 4. awk…

Read More Read More

Time

Time

Today I struggled with the time command. I wanted to use it in a bash script, so I checked the man page, where I found interesting stuff : $ man time time – run programs and summarize system resource usage SYNOPSIS time   [ -apqvV ] [ -f FORMAT ] [ -o FILE ] [ –append ] [ –verbose ] [ –quiet ] [ –portability ] [ –format=FORMAT ] [ –output=FILE ] [ –version ] [ –help ] COMMAND […

Read More Read More

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 😀