Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
COMP1204 LabWork
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ab5e20
COMP1204 LabWork
Commits
c7ed7362
Commit
c7ed7362
authored
3 years ago
by
ab5e20
Browse files
Options
Downloads
Patches
Plain Diff
Adding a new script that shows the use of variables and saving pther scripts as variables
parent
66901d58
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
var.sh
+12
-0
12 additions, 0 deletions
var.sh
with
12 additions
and
0 deletions
var.sh
0 → 100755
+
12
−
0
View file @
c7ed7362
#!/bin/bash
#Set a variable
exampleVariable
=
600
#Set a variable from other scripts
exampleVariable2
=
$(
./hello.sh
)
#Print out result
echo
The value of the variable is
$exampleVariable
echo
the value of variable 2 is
$exampleVariable2
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment