niedziela, 26 czerwca 2011

Bash and file name extraction

To extract file name from full path one can use the following syntax

file=/home/user/test
echo ${file##*/}

For path use

echo "${file%/*}"


And for extension

echo "${file##*.}"

sobota, 25 czerwca 2011

Upgrade Fedora 14 to 15

The easiest way to upgrade Fedora 14 to 15 is by using PreUpgrade.
Install it as follows:
yum install preupgrade

Then run preupgrade and just click select Fedora 15 and next :).