• Home
  • Ubuntu 18.04
    • Whats New?
    • Upgrade Ubuntu
    • Install Java
    • Install Node.js
    • Install Docker
    • Install Git
    • Install LAMP Stack
  • Tutorials
    • AWS
    • Shell Scripting
    • Docker
    • Git
    • MongoDB
  • Funny Tools
  • FeedBack
  • Submit Article
  • About Us
TecAdmin
Menu
  • Home
  • Ubuntu 18.04
    • Whats New?
    • Upgrade Ubuntu
    • Install Java
    • Install Node.js
    • Install Docker
    • Install Git
    • Install LAMP Stack
  • Tutorials
    • AWS
    • Shell Scripting
    • Docker
    • Git
    • MongoDB
  • Funny Tools
  • FeedBack
  • Submit Article
  • About Us

Tag: script

27 September 2018

How to Create and Use Array in Bash Script

Written by Rahul
Rahul
An array is a data structure consist multiple elements based on key pair basis. Each array element is accessible via a key index number. This tutorial will help you to create an Array in bash script. Also, initialize an array, add an element, update element and delete an element in the bash script. Define...
Read More about How to Create and Use Array in Bash Script
Bash Shell Leave a Comment
26 June 2016

How to Include Bash Script in other Bash Script

Written by Rahul
Rahul
Bash scripts are very useful for doing work easier. It also helps for task automation. This tutorial will help you to how to include bash script in other bash script. Create Sample Scripts For example, I am creating two scripts, first is config.sh which contains some variables. Second script is our main script main.sh,...
Read More about How to Include Bash Script in other Bash Script
Bash Shell Leave a Comment
16 August 2015

Bash Script – Prompt to Confirm (Y/N, YES/NO)

Written by Rahul
Rahul
Question – How to add [Y/n] confirmation in our own shell scripts? Many times you have seen commands ask for confirmation [Y/n] or [Yes/No] input. This is a very useful part to know if a user wants to proceed with remaining steps for not. You can also add the same function to your script....
Read More about Bash Script – Prompt to Confirm (Y/N, YES/NO)
Bash Shell 3 Comments
07 April 2015

Check If File has Read, Write & Execute Permission – Bash Script

Written by Rahul
Rahul
This is good to test a file has enough permission to do read, write or execute operation’s. For a good programmer you should use these functions before doing any operations on file. 1. Test if File has Read Permission: Below script will check if given file has read permission for current logged in user....
Read More about Check If File has Read, Write & Execute Permission – Bash Script
Bash Shell Leave a Comment
02 April 2015

Bash Script – Check If File is Empty or Not

Written by Rahul
Rahul
While working with bash shell programming, when you need to read some file content, It is good to test that given file is exits or not after that test if file is empty or not. This will safe your script from throwing errors. This article will help you to test if file exists or...
Read More about Bash Script – Check If File is Empty or Not
Bash Shell Leave a Comment
21 February 2015

Find the Document Root using PHP Script

Written by Rahul
Rahul
DOCUMENT ROOT is the path where application is stored on file system. In some application’s we need to use absolute path of any file or script in our php script, While development we really don’t know where application will be hosted on server. In that case we can use php function getenv() to get...
Read More about Find the Document Root using PHP Script
PHP Leave a Comment
15 February 2015

How to Pass Command Line Arguments in Shell Script

Written by Rahul
Rahul
A Command-line Arguments are passed after the name of a program in command-line operating systems like DOS or Linux and are passed into the program from the operating system. Shell scripts also accept command line arguments similar to nix commands. Command line arguments are useful for passing input to script at runtime which has...
Read More about How to Pass Command Line Arguments in Shell Script
Bash Shell 1 Comment
08 January 2015

Working with WHILE Loop in Bash Shell Scripting

Written by Rahul
Rahul
Similar to for loop, while loop is also entry restricted loop. It means condition is checked before executing while loop. Mostly it also can do all the works which for loop can do but in uses it has own benefit of use in programming. Syntax: while [ condition ] do // programme to execute...
Read More about Working with WHILE Loop in Bash Shell Scripting
Bash Shell Leave a Comment
07 January 2015

Working with FOR Loop in Bash Shell with Examples

Written by Rahul
Rahul
Loops are very useful for doing repetitive tasks for any programming language. For loops are also available for bash scripting. In this article we will learn about uses of for loops with useful examples. Syntax: for VARIABLE in PARAM1 PARAM2 PARAM3 do // commands to execute done In above syntax PARAM1, PARAM2 and PARAM3...
Read More about Working with FOR Loop in Bash Shell with Examples
Bash Shell Leave a Comment
02 December 2014

How to Find Script file name in a Bash Script

Written by Rahul
Rahul
Command SNAME=$(basename “$(test -L “$0” && readlink “$0” || echo “$0″)”) While running a bash script using Linux terminal the script name can also passed as argument at $0. but if we are using full path of script to execute, it will show full path as results when print value of $0. So use...
Read More about How to Find Script file name in a Bash Script
Bash Shell Leave a Comment
1 2 Next →

Popular Posts

  • How To Install Zabbix Agent on Debian 9/8
  • How to Install and Configure Squid Proxy on Debian 9
  • How To Install Wine 3 on Debian 9 (Stretch)
  • How to Remove “public/index.php” from URL in Laravel
  • How to Install Swift on Ubuntu 18.04 LTS
All rights reserved. © 2013-2018 TecAdmin.net. This site uses cookies. By using this website you agree our term and services