User Tools

Site Tools


bash_scripting

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

bash_scripting [2021/07/22 02:43]
vissie created
bash_scripting [2021/07/22 02:49] (current)
vissie
Line 1: Line 1:
 =====Ask for input===== =====Ask for input=====
 +<sxh bash; gutter: false>
 +#!/bin/bash
 echo Hello, who am I talking to? echo Hello, who am I talking to?
 read varname read varname
 +echo It\'s nice to meet you $varname
 +</sxh>
 +
 +=====Check if file does not exist=====
 +<sxh bash; gutter: false>
 +#!/bin/bash
 +FILE=/etc/docker
 +if [ ! -f "$FILE" ]; then
 +    echo "$FILE does not exist."
 +fi
 +</sxh>
 +
bash_scripting.1626947020.txt.gz ยท Last modified: 2021/07/22 02:43 by vissie