Subscribe to A Journey Through My Geek Life        RSS Feed

Some more things that are irrellivant to you that excite me :D

Icon Leave Comment
I've completed my first class. It was easy enough. I'm in my second class, CompTIA Strata Fundamentals. Easy peesey. That's really not what I'm making this entry about, though. I'm making this entry to say this; I've realized that I'm starting to develop the critical thinking and abstract problem solving skills required to become a successful developer. I say this because, while trying to look through my massive .bashrc file, I realized that I needed an easier way. I wrote a short script aliased into my .bashrc that will cat my bashrc, and grep some input.
read INPUT; cat ~/.bashrc | grep $INPUT
I then realized that I had done some other scripting. It seems a bit dirty to me, but it was written to copy a user's .bashrc file into a Dropbox folder so Dropbox would automatically upload it. I would hate to lose the file that I've become so dependent on.
# This script is set to back up eash user's .bashrc file to dropbox.

DATE=$(date +\%Y-\%m)
DAY=$(date +\%d)
if [ ! -d "$DATE_DIR" ]; then
    mkdir /home/$USER/Dropbox/bashrc/$DATE/
    echo Directory $DATE created.

if [ ! -d "$DAY_DIR" ]; then
    mkdir /home/$USER/Dropbox/bashrc/$DATE/$DAY/
    echo Directory $DAY created within directory $DATE.

cp /home/$USER/.bashrc /home/$USER/Dropbox/bashrc/$DATE/$DAY/bashrc;
echo .bashrc file has been backed up.

exit 0;

Either way, I really think this is a good thing for me. While scripting, to my understanding, is not nearly as complex as programming, it still uses the same skills as programming, even if it may be on a different level.

0 Comments On This Entry


Trackbacks for this entry [ Trackback URL ]

There are no Trackbacks for this entry

June 2018

24 25 2627282930


    Recent Comments

    Search My Blog

    0 user(s) viewing

    0 Guests
    0 member(s)
    0 anonymous member(s)