cpowel2
cpowel2

Reputation: 605

Executing shell script in ubuntu

Maybe I am missing something here but I have the following small bash script to delete some old files that get created when using flex and yacc its pretty simple but when I run the script it echos the result to the terminal but does not delete the file I'm probably missing something stupid could you guys point me in the right direction.

#!/bin/bash

echo "rm -f y.tab.h"; (just using one file for now)

I tried changing it to

echo rm -f y.tab.h;

but still no luck

I tried executing it with bash delete.sh and sh delete.sh and even using chmod +x on the file and executing it with ./

Upvotes: 0

Views: 171

Answers (1)

nandeesh
nandeesh

Reputation: 24820

Remove echo statement

Just use

rm -f y.tab.h

Upvotes: 2

Related Questions