Create a bash shell script that removes all files whose
names end with a "~" from your home directory and
subdirectories. Name this script "cleanup.sh"

Answer Posted / kuldeep singh

#!/bin/sh

cd | ls -lR | grep "~$" | rm -f

Is This Answer Correct ?    1 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is mac default shell?

614


How will you connect to a database server from linux?

553


Why should we use shell scripts?

587


What shell is bin sh?

530


I want to connect to a remote server and execute some commands, how can I achieve this?

570






What is awk in shell script?

748


What are scripts in psychology?

588


c program to implement unix/linux command to block the signal ctrl-c and ctrl-\ signal during the execution ls -l|wc -l

3152


What is the syntax of "nested if statement" in shell scripting?

627


How can the contents of a file inside jar be read without extracting in a shell script?

585


How do I run a shell script on a mac?

623


What does chmod do?

570


Can you write a script to portray how set –x works?

550


c program the catches the ctrl-c(SIGINT) Signal for the first time and prints a output rather and exit on pressing Ctrl-C again

5202


What is a shell script in windows?

583