How to create a file using shell / bash program script


How to create a file using shell / bash program script

To achieve today in the shell tutorial we are creating a new file by name example2.sh
There might be need to create a file on the fly using the script . 


Create a file example2.sh

paste the below code

#!/bin/sh
touch "testFile"




How to execute shell script


 in command prompt or shell mode

type sh example.sh


now check your folder location the new file will be created


similary log files can be created using shell or bash script


Comments

Popular posts from this blog

Vendor autoload is not found. Please run 'composer install' under application root directory.

Uncaught TypeError: require.config is not a function CSS and Javascript files are not loading after Magento 2 installation

HTTP_RAW_POST_DATA is deprecated from PHP 5.6 onwards and will be removed in PHP 7.0