Category Archives: Operating System

Bash For Loops



we can check at the end that loop is not working by this



Another examples can be c like styles:

Bash IF Else with for loop break and continue  have to practice later time 🙂


Here is the video all for loop explained beautifully


Bash Programming : Say user hello !

Take a name from user and say hello user! 😀


Bash Programming : Check typed name is a valid $USER or not

I tried it hardly….Here you have to maintain the syntax

echo expr ""Hello Name

and this conditional

if [ “foo” = “foo” ]; then
echo expression evaluated as true

or the same things can be written as

if[ “foo” = “foo” ]
echo expr "Hello !"

if..then..else in bash

if [ “zaki” = “live” ]
echo expr "True !"
else echo
expr “False!”

conditional with variables
if [ "$t1" = "t2" ]
expr “True”
expr “False”`
fi #you have to end with this if you started with if



Bash Programming : Multiplication

Here I tried this on ubuntu

To create the file

code type in the terminal:

save the file and close editing mode:

change the permission of this file:

to show the output


Bash Programming : Addition

Here I tried this on ubuntu

To create the file

code type in the terminal:

don’t give space after or before equal sign

save the file and close editing mode:

change the permission of this file:

to show the output

Shortcut method for addition or any other:
create a file with cat then type code from the below in one line

here 1 2 and 3 is variable is taking input from user and also giving teh output so we sue $ before them….it is the shortcut method

then just type

and you will get the addition of this variables

Hibernate or Sleep which is best ?

From my point of view and by searching various websites  I have found that

Hibernate is good that it resume all of your work after an extended period of time…..And do not use any power while close

and For sleep it can be use for shortest period of time and it uses some power while close…

So hibernate is good from the comparison and my personal experience

But we have to be cautious not to do those things too much Hibernate or Sleep that can sometimes causes the damage for hard disk if power interruption or any misinterpretation happens.



Odd Even in Bash/Shell Scripting

I tried it so many times but it didn’t gave the solution but the code I have found on the net and I understood where my problem was

caution: Don’t forget to give space after if eg. if [ ] and symbols eg. [ $remainder = 0 ]

and don’t forget to style after then eg.

echo “$number is evern”
echo “$number is odd”

if you don’t do all of the above mentioned system will give various errors.

CPU Scheduling: Round Robin Algorithm

Fixing Master Boot Recrord(MBR) issue with BIOS and Windows 7

Insert Windows 7 DVD in the DVD – ROM
then Keep Nexting and Repair Windows option will come then you have to click comamnd prompt when system recovery option comes then click bootrec

>bootrec /fixmbr

and enter then type >exit

then just restart  the system

Boot screen will be back again 🙂

This video helped me a lot by showing how the command perform

হার্ডডিস্ক পার্টিশান

নতুন হার্ড ডিস্ক টা অনেক দিন পর পারটিশান করতে বসলাম …এতদিন যে ড্রাইভটাতে উবুন্তু দিয়ে চালাচ্ছিলাম সেটায় এখন রিসাইজ করছি জিপার্টেড লাইভ দিয়ে…ইউএসবি থেকে বুট করা এটা

মান টা অনেক টা এরক ম
/dev/sdb1 উইন্ডোজ এর জন্য NTFS টা 170.83GiB বা 174932 MiB (NTFS)[primary]
/dev/sdb3 উবুন্তু এর জন্য 184998 MiB(Mebabytes) বা 180.66GiB (EXT4)[primary]
sdb3 কে ডিলিট ক রে দিইয়ে এভাবে সেটাপ ক রেছি যাতে উইন্ডোজ আর উবুন্তু পাশাপাশি সুন্দর করে থাকতে পারে
/dev/sdb7 29998(30000)MB root / ext4
/dev/sdb8 19998(20000)MB swap
/dev/sdb9 143977MB /home ext4
/dev/sdb2 Extended space e অ্যালোকেটেড করে
/dev/sdb5 ব্যাকাপ এর জন্য 928.77 GiB বা 951061 (NTFS)[logical]
/dev/sdb6 গেমস এর জন্য NTFS টা 500.60GiB বা 512618 (NTFS)[logical]
Unallocated স্পেস 82.15GiB

৪ টার বেশী প্রাইমারী পার্টিশান একটা হার্ড ডিস্ক এ বানানো যায় না…এখেত্রে এক্সটেন্ডেড ভার্শান ক রে নেয়া প্রয়োজন

আর আরেকটা কথা এক্সটেন্ডেড পার্টিশান কেবল একটাই থাকতে পারে মনে হয়