We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 88c204a commit 6e71b1fCopy full SHA for 6e71b1f
1function.sh
@@ -0,0 +1,26 @@
1
+#!/bin/bash
2
+#Purpose: Function example. Taking Backup of Particular File
3
+#Version:1.0
4
+#Created Date: Sat May 26 00:27:50 IST 2018
5
+#Modified Date:
6
+#WebSite: https://arkit.co.in
7
+#Author: Ankam Ravi Kumar
8
+# START #
9
+function takebackup (){
10
+ if [ -f $1 ]; then
11
+ BACKUP="/home/aravi/$(basename ${1}).$(date +%F).$$"
12
+ echo "Backing up $1 to ${BACKUP}"
13
+ cp $1 $BACKUP
14
+ fi
15
+}
16
+
17
+takebackup /etc/hosts
18
+ if [ $? -eq 0 ]; then
19
+ echo "BAckup Success"
20
21
+function testing (){
22
+echo "Just TEsting Function"
23
24
25
+testing
26
+# END #
0 commit comments