PDA

View Full Version : shell script program



phanipalagummi
February 5th, 2009, 02:02 PM
please give me the solution for the below program

Display directory in the present directory

Tek-E
February 6th, 2009, 05:24 AM
I "might" be able to help.....But I dont cleary understand what exactley your asking for... :/

croto
February 6th, 2009, 06:57 AM
pwd?

hamzah2096
February 6th, 2009, 07:06 AM
I think maybe he is saying to make something like ls or dir/w.

|{urse
February 6th, 2009, 07:26 AM
what shell? Bash?



#!/bin/bash
pwd && ls -lcopy that into your favorite text editor, i suggest gedit if you arent familiar with vi or nano. Save it.

then navigate your way to wherever you saved the file and either


chmod +x filename

or just right click on the file and set the file to executable under the permissions tab.

now either 2x click the file to run it

or run it from the terminal with


./filenameor


sh filename
easy peasy