Bash: Log File Archive Script


There are some logs files are in such format: 20120130-174201-130947.log. I created two bash scripts to archive them by year/month/day: The first one is based on the log file creation date, the other one is based on the time stamp within the file name. #Backup Script1: Use modification date of the file#!/bin/bash #Define the Log … Continue reading Bash: Log File Archive Script

Bash: UT-Citrix


I developed the Ubuntu version Citrix thin client. To follow the same naming convention as TC-Citrix, I name it UT-Citrix. Here are the key scripts: checkip #!/bin/bash #wait for the DHCP ready while ! ifconfig eth0 | grep 'inet addr' >/dev/null 2>&1 do echo sleep 2 done sysprep #!/bin/bash #rename the computer echo HOSTNAME=UT-`ifconfig | … Continue reading Bash: UT-Citrix