Quantcast
Channel: Unix Scripting – wikiconsole
Viewing all articles
Browse latest Browse all 10

Unix Shell Scripts – Example 2

$
0
0

Write a shell script takes the name a path (eg:  /venkat/wikiconsole/material/handin ), and counts all the sub directories (recursively).

Ans:

#! /bin/sh

<span style="font-size: small; color: #000000;">ls –R $1 | wc –l
</span>
<span style="font-size: small; color: #000000;">run the script as:
</span>

% sh example2.sh  /venkat/wikiconsole/material/handin 


Viewing all articles
Browse latest Browse all 10

Trending Articles