Posts

Showing posts with the label SHELL SCRIPTING

SHELL SCRIPTING EXAMPLE SET 2

  In " SHELL SCRIPTING EXAMPLE SET 2 ", You can learn How to declare a static array, How to print all elements of an array, How to print the first element, How to print a particular element, How to print elements in the range, How to extract the length of a particular element, and size of an array, How to replacing sub string temporary. topics with examples. In " SHELL SCRIPTING EXAMPLE SET 2 ", You can learn Comparison operators used in Numbers, Strings, and Files. In this “ Shell Script Example Set 1 ″ article, You can learn different programming commands in LINUX Shell. It covers File related scripts, date-related scripts, calculator related scripts, directory related scripts. Check once. Shell Scripting Example Set 2 ARRAY IN SHELL #! /bin/bash #To declare static Array arr=(prakhar ankit 1 rishabh manish abhinav) #To print all elements of array echo ${arr[@]} # prakhar ankit 1 rishabh manish abhinav echo ${arr[ ]} # prakhar ankit 1 ...