Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

Execute Bash Shell Online

#!/bin/bash
FILE="$1"
if [ $# -eq 0 ];
then
echo "Pass appropriate number of command line arguments"
fi
if [ ! -f "$FILE" ] && [ ! -d "$FILE" ] && [ ! $# -eq 0 ];
then
echo "Input file does not exist"
fi
if [ -d "$FILE" ];
then
echo "Input file is not an ordinary file"
fi
if [ ! -r "$FILE" ];
then
echo "Input file does not have read permission"
fi
if [ -f "$FILE" ] && [ -r "$FILE" ];
then
grep -cvP '\S' "$FILE"
fi

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.