Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kiruthiga #20

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

kiruthiga #20

wants to merge 4 commits into from

Conversation

kiruthiga2001
Copy link

Ex-1 wilcards
Write a shell script that renames all files in the current directory that end in ".jpg" to begin with today's date in the following format: YYYY­MM­DD. For example, if a picture of my cat was in the current directory and today was October 31, 2016 it would change name from "mycat.jpg" to "2016­10­31­mycat.jpg".

Ex-1 wilcards
Write a shell script that renames all files in the current directory that end in ".jpg" to begin with 
today's date in the following format:  YYYY­MM­DD.  For example, if a picture of my cat was in 
the current directory and today was October 31, 2016 it would change name from "mycat.jpg" to "2016­10­31­mycat.jpg".
Functions
Ex-1

Write a shell script that consists of a function that display the number of files in the present 
working directory.  Name this function "file_count" and call it in your script.  If you use a variable in your function, remember to make it a local variable.
Ex-5
Write a shell script to check to see if the file “file_path” exists. If it does exist, display “file_path passwords are enabled.” Next, check to see if you can write to the file. If you can, display “You have permissions to edit “file_path.””If you cannot, display “You do NOT have permissions to edit “file_path””
Ex-6
Write a shell script that displays “man”,”bear”,”pig”,”dog”,”cat”,and “sheep” on the screen with each appearing on a separate line. Try to do this in as few lines as possible.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant