nixers
Official Introduction from neo1691 - Printable Version
+- nixers (https://nixers.net)
+-- Forum: General (https://nixers.net/Forum-General)
+--- Forum: Community & Forums Related Discussions (https://nixers.net/Forum-Community-Forums-Related-Discussions)
+--- Thread: Official Introduction from neo1691 (/Thread-Official-Introduction-from-neo1691)


Official Introduction from neo1691 - neo1691 - 25-08-2014

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!


RE: Official Introduction from neo1691 - z3bra - 25-08-2014

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 !


RE: Official Introduction from neo1691 - neo1691 - 25-08-2014

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!


RE: Official Introduction from neo1691 - z3bra - 25-08-2014

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.


RE: Official Introduction from neo1691 - thetornainbow - 25-08-2014

Welcome to the forums! Don't drink the water, but you should be fine otherwise!


RE: Official Introduction from neo1691 - neo1691 - 25-08-2014

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.


RE: Official Introduction from neo1691 - shtols - 25-08-2014

\o Ohai & welcome!


RE: Official Introduction from neo1691 - neo1691 - 25-08-2014

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!!


RE: Official Introduction from neo1691 - xero - 26-08-2014

welcome and keep on scripting/coding!


RE: Official Introduction from neo1691 - neo1691 - 26-08-2014

Thanks! cheers!!