The Cookie Machine - Click here to drag window

DUMMY TEXT - Real text set in assets/js/theCookieMachine.js

If you can read me, I'm broken!

Views: 4,874β€…    Votes:  2β€…
Tags: command-line   bash   scripts   xubuntu   sh  
Link: πŸ” See Original Answer on Ask Ubuntu ⧉ πŸ”—

URL: https://askubuntu.com/q/1142370
Title: Shell script error to check if file exists
ID: /2019/05/11/Shell-script-error-to-check-if-file-exists
Created: May 11, 2019
Upload: April 8, 2024    Layout:  post
TOC: false    Navigation:  false    Copy to clipboard:  false


I made a few changes to your script:

#!/bin/bash

echo -e "Enter filename: \c"
read filename

if [ -e "$filename" ]
then
    echo "$filename found"
else
    echo "$filename not found"
fi
⇧ GUI or simple Bash script to throttle the CPU? CPU governor changes automatically to "performance" under load  β‡©