View xml files like a pro

Viewing XML files can be daunting with tracking mentally where the tag starts and where it ends. So, I ended up with the following alias to help me view xml files

xmllint --format - | pygmentize -f 16m -O style=native -g

xmlwf – Is your xml document well formed?

There is a small nifty utility called xmlwf that can check your xml documents to see if they are well formed.

sudo yum install expat

Once installed, simply use :


Need more details, just check the man page 🙂

Enhanced by Zemanta

Script to get yourself some conkyrc files

Table of contents for conkyrc

  1. Get yourself some conkyrc files.
  2. Script to get yourself some conkyrc files
  3. Cont: Get yourself some more conkyrc files.

Continuing from where we left, here is a script that can do all this for you 🙂

curl\&page=$i | sed -n '/\\/pr/ p'| sed '// d'| sed 's##\n-----------------------------------\n\n\n#' >conkyrc
	dos2unix conkyrc
	cp conkyrc .test
	while [ $(wc -l .test|sed 's/[^0-9]//g') != 0 ]
		sed -n '1,/------------------------/ p' .test|sed '$d' >conkyrc.$count
		diff .test conkyrc.$count |sed 's/^<.//'|sed '1, /---------------------/ d;2d'>.test

This will create couple of conkyrc.files in the current directory. Each of these is one from the web-page that I mentioned earlier. So, enjoy….

Enhanced by Zemanta