Factor numbers in Linux
Answer:
This command is very handy for finding the prime factors of number n.
E.g.
# factor 100
100: 2 2 5 5
Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.
Factor numbers in Linux
Answer:
This command is very handy for finding the prime factors of number n.
E.g.
# factor 100
100: 2 2 5 5
Print large banner on printer
Answer:
This is a less well known command for Linux. It allow you to prints a large, high quality banner on the standard output.
Example:
# banner -w 80 Hello World
Where -w change the width of the output, in which the default is 132.
Convert a Nero .nrg file to .iso file
Answer:
It is easy to convert a Nero .nrg file to an .iso file, using the following command.
# dd bs=1k if=input.nrg of=output.iso skip=300
Case conversion of string in Linux
Answer:
To convert a string to upper case letter, you can use the following command.
# echo 'Test' | tr '[:lower:]' '[:upper:]'
On the other hand, if you want to convert from upper case to lower case, you can use
#echo 'Test' | tr '[:upper:]' '[:lower:]'
How to validate the format of a XML file in Linux?
Answer:
You can use xmllint, which came as part of the libxml2-utils package.
To install
# sudo apt-get install libxml2-utils
To validate the format of XML document
# xmllint --noout file.xml