Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

a) Write a shell script to list all of the directory files in a directory.

# !/bin/bash
echo "enter directory name"
read dir
if[ -d $dir]
then
echo "list of files in the directory"
ls –l $dir|egrep ‘^d’
else
echo "enter proper directory name"
fi
Comment

PREVIOUS NEXT
Code Example
Shell :: install ionic 6 
Shell :: uninstall dependencies yarn 
Shell :: know version of centos ec2 
Shell :: active developer path does not exist 
Shell :: get Operating system command 
Shell :: kill port 3000 ubuntu 
Shell :: hydra use find password cracker 
Shell :: linux count number of times word appears in file 
Shell :: download unity for linux 
Shell :: wget git bash 
Shell :: how to install gnu lib tool 
Shell :: install font on linux 
Shell :: check time in linux 
Shell :: Install PHP Plugin ubuntu 
Shell :: how to install blackeye bash 
Shell :: how to use string format in powershell 
Shell :: terminal for kali linux 
Shell :: set origin url git 
Shell :: arch linux change timezone 
Shell :: find how many lines in a file linux 
Shell :: restart docker 
Shell :: install spark on mac 
Shell :: how to change branch name in github 
Shell :: github error “Commit your changes or stash them before you can merge”? 
Shell :: git clone repo with name 
Shell :: unzip ubuntu 
Shell :: Run Google Colab With Local Files 
Shell :: symfony install doctrine 
Shell :: rclone gui 
Shell :: cascadia code vscode ubuntu 
ADD CONTENT
Topic
Content
Source link
Name
6+6 =