Official Introduction from neo1691 - Community & Forums Related Discussions

Users browsing this thread: 1 Guest(s)
neo1691
Members
Hey guys, wassup,, my first post here. I usually hang out in the irc, and recently wanted to remain active in the forums as well.

So hi everyone, how are you all. I am using Arch Linux on my laptop. Recently had a gaming discussion with nixers on the irc and now I am hooked on dota 2.

My aim for being here is to learn more about linux, how things work under the hood. I am also looking to participate in one or two open source competitions.

I just love the customizations that you guys do with your linux boxes,
and I also want myself to be able to do the same on my own, that's the aim for me being here. And I hope that being with you guys I would be able to get what I want.!!

That's a decent speech I guess!
z3bra
Grey Hair Nixers
You're in one of the best place to reach your goals ;)
I'll help you if you need it. Welcome here and happy learning !
neo1691
Members
Thanks a lot. I would like to know where should I start with? I think shell scripting should be my best bet. I should start writing small small scripts and see how I fare with the scripts written for the same purpose, and evaluate myself.

I love reading your blogs btw z3bra!
z3bra
Grey Hair Nixers
Well, in order to learn more about linux, you _HAVE_ to learn shell scripting. It's not that hard. A script is a file containing a set of commands.

Let's say you notice that you do the following a lot:
Code:
~$ ls
Desktop Pictures Videos
~$ cd Videos
~/Videos $ ls
MLP-season-1/ Youtube-DL/ 2girls1cup.avi goatse.avi
~/Videos $ mplayer goatse.mp4
You can simplify the process of entering a directory and choosing a video by scripting it

Code:
#!/bin/sh
#
# z3bra (c) wtfpl
# Select a video to watch from a specified directory
VIDEO_DIR="$HOME/Videos"

cd $VIDEO_DIR
select VIDEO in ls *.avi
do
    mplayer $VIDEO &
done
exit 0

And there you are. This is a script !
Start it, and it will prompt you for all the .avi files in your ~/Videos, ask you for the file you want and play it via mplayer.
thetornainbow
Members
Welcome to the forums! Don't drink the water, but you should be fine otherwise!
neo1691
Members
I understand the syntax of scripts. Knowing C/C++ and a little bit of Java surely helps! But what I want is some real practise with it. Specially how to keep scripts running in the background, make them less resource hungry and so far and so forth! Thanks a lot for the welcome.
shtols
Long time nixers
\o Ohai & welcome!
neo1691
Members
shtols!! Hi!! That's the kind of welcome that really motivated me to write my own script. I used to download subtitle of tv shows using subliminal.
It's syntax was
subliminal -l en -- video.mkv

so I created a script to download the subtitiles for all the videos in the specified directory!!
Although I could have used inotify for that. But nevertheless here it is!!

#!/bin/sh
# A script to use subliminal and download
# subtitles in the directory passed as an
# argument to the script

if [ -z $1 ]
then
echo "usage fetchSubs.sh Path"
fi

for file in `ls *mkv`
do
subliminal -l en -- $file
done

Feel's good man!!
xero
Long time nixers
welcome and keep on scripting/coding!
neo1691
Members
Thanks! cheers!!