How to create script file using linux SuSE

Asked By 0 points N/A Posted on -

 I am using linux SUSE. I don’t know much about terminal commands. I want to create shell script or file having program. How to run program and show results on terminal? Tell me an easy way.

Answered By 0 points N/A #124806

How to create script file using linux SuSE


You want to write program through terminal. You need to follow some steps. In fact follow some commands.

First create file. Come to the desktop directory. 

> cd Desktop

Desktop> cat >

Your file is created. You can see it on your desktop. Now write program.

If(test “$1” –lt 50) && (test “$1” –ge 10);


Echo “you are kid”

Elif(test “$1” –lt 50) && (test “$1” –ge20);


Echo “you are between 20 to 50”


This is the lines of code. Write it properly. Then press ctrl+D

You will come to the prompt. That is >

> chmd +x

> ./ 23

23 is your input. You may write anything.

The output will come out.

Your are between 20 to 50.

This is a short tutorial, you can follow it for understanding.

Login/Register to Answer

Related Questions