Saturday, March 11, 2017

Shell Scripting Tutorial for Beginners 6 - File test operators

#! /bin/bash

echo -e "Enter the name of the file : \c"
read file_name

if [ -s $file_name ]
  echo "$file_name not empty"
  echo "$file_name empty"
IT Certification Category (English)640x480

Partner Sites

Top Online Courses From ProgrammingKnowledge

Python Course
Java Course
Bash Course
Linux Course
C Course
C++ Course
PHP Course
Android Course
C# Course
JavaFx Course
NodeJs Course
Jenkins Course
Scala Course
Bootstrap Course
MongoDB Course
QT C++ GUI Course