---
layout: page
category-page: scripts
category-title: Scripting
tags: variables defining deleting naming
author: Dario Rasic
title: Script Variables
previous-page: pages/scripts/0-base-commands.html
next-page: pages/scripts/2-special-variables.html
---
A variable is simply a string to which we assign a certain type of data,
which could be a text, a number, a filename and other types of data.
VAR_1 VAR_2 NAME_3 name_4
variable_name=variable_valueLet me show you a simple example:
VAR_1=StrawberryTo access a variable we have to use the dollar sign ($). So if I want to access VAR_1, I have to write:
VAR_1="Strawberry" echo $VAR_1 Strawberry
unset variable_namewhich in our case would be:
unset VAR_1
VAR_1="Strawberry" readonly VAR_1 VAR_1="Blueberry" VAR_1: This variable is read only.If we try to delete the variable, shell will give us the following value:
VAR_1="Strawberry" unset VAR_1 VAR_1: This variable is read only.