By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,276 Members | 1,979 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,276 IT Pros & Developers. It's quick & easy.

Bash. Problem writing a script

P: 1
Hello, I'm a beginner in programming and I'm having trouble writing a script.
Write a script with two parameters: file name mask and directory name.
The script's task is to display a list of file names from the given directory, matching the given mask together with the name of the owner and his UID number
I am asking for advice on the execution of the script.
Regards. :)

Expand|Select|Wrap|Line Numbers
  1. ! # / Bin / bash
  2. find "$ 1" -name "*. $ 2" -exec stat -c "% N% u% U" '{}' \;
Jan 18 '20 #1
Share this Question
Share on Google+
1 Reply

P: 94
Expand|Select|Wrap|Line Numbers
  1. #!/bin/bash
  2. find $1 -name *.$2 -exec stat -c "%N%u%U" {} \;
Jan 19 '20 #2

Post your reply

Sign in to post your reply or Sign up for a free account.