Posted by The TechMentor in Journal
on May 23rd, 2014
# cat * | grep ^T > Total.txt # cat Total.txt | sed 's/T //' > Tstriped.txt # grep -v '^Tr' Tstriped.txt > Total.txt # cat Total.txt | sed -e 's/ 1999//' -e 's/ Sun//' -e 's/ Mon//' -e 's/ Tue//' -e 's/ Wed//' -e 's/ Thu//' -e 's/ Fri//' -e 's/ Sat//' > Finished.txt # cat Finished.txt | sed -e 's/^\(.\{12\}\)/\1,/' -e 's/^\(.\{26\}\)/\1,/' -e 's/ ,/,/g' > Final.csv Extract Only Track Info Remove Track Label Remove Beginning and End lines Get rid of Days and Year Add Commas

Posted by The TechMentor in BASH, Scripts
on May 20th, 2014
If you spend much time at all coding or scripting you realize that you often do some of the same things over and over. That’s where functions and libraries come in. Having a library of commonly used functions handy helps speedup the coding process quite a bit. Usually I prefer to use the best tool for the job. That means using Perl, PHP, C, C++, BASH, or any other language suited for the task. However, lately I’ve been using BASH more than usual. Primarily because it’s pretty much guaranteed to be on just about ever, non Windows, system that I touch. Unfortunately, while I have an...

Posted by The TechMentor in Journal, Web Geeking
on Apr 25th, 2014
Install the dependencies: sudo apt-get install libatk1.0-0 libc6 libcairo2 libfontconfig1 libfreetype6 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk2.0-0 libidl0 libnspr4 libnss3 libpango1.0-0 libpng12-0 libstdc++6 libx11-6 libxft2 libxinerama1 libxrender1 libxt6 zlib1g Download the packages: wget -c https://launchpad.net/ubuntu/+archive/primary/+files/kompozer-data_0.8~b3.dfsg.1-0.1ubuntu2_all.deb wget -c https://launchpad.net/ubuntu/+archive/primary/+files/kompozer-dev_0.8~b3.dfsg.1-0.1ubuntu2_all.deb wget -c https://launchpad.net/ubuntu/+archive/primary/+files/kompozer_0.8~b3.dfsg.1-0.1ubuntu2_amd64.deb...

Posted by The TechMentor in Journal, System Configuration
on Apr 16th, 2014
Bought a 6-pack of 4GB USB thumb drives for various backups. I installed them on liminf01, liminf03, and kfserver01. Used the following commands to format and mount them, since CentOS 5.10 did not automatically mount them. I originally went with the default FAT32 filesystems, but rsync filed to create symlinks, surprise! Step 1: Identify the proper device: $ ls -al /dev/sd* brw-r----- 1 root disk 8, 0 Apr 9 17:59 /dev/sda brw-r----- 1 root disk 8, 1 Apr 9 17:59 /dev/sda1 brw-r----- 1 root disk 8, 2 Apr 9 18:00 /dev/sda2 brw-r----- 1 root disk 8, 3 Apr 9 17:59 /dev/sda3 brw-r----- 1 root disk 8, 16 Apr...

Posted by The TechMentor in git
on Apr 7th, 2014
# Revert changes to modified files. git reset --hard # Remove all untracked files and directories. git clean -fd If you want to revert the changes only in current working directory, use git checkout -- .

Posted by The TechMentor in git, System Configuration
on Apr 7th, 2014
Setup RPMForge Repository $ wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm $ rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt $ rpm -K rpmforge-release-0.5.3-1.el6.rf.*.rpm $ sudo rpm -i rpmforge-release-0.5.3-1.el6.rf.*.rpm Disable CentOS Base Repository and Enable RPMForge Extras $ cd /etc/yum.repos.d/ $ sudo vi CentOS-Base.repo Add enabled = 0 [base] name=CentOS-$releasever - Base mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os #baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/ enabled = 0...
