473,396 Members | 1,599 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Bash. Problem writing a script

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
1 3191
SioSio
272 256MB
Expand|Select|Wrap|Line Numbers
  1. #!/bin/bash
  2. find $1 -name *.$2 -exec stat -c "%N%u%U" {} \;
  3.  
Jan 19 '20 #2

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

Similar topics

7
by: LRW | last post by:
Sorry to crosspost, but I have no idea if this is more a PHP question of general Linux question. I have a script that makes changes to image files, montages them into a jpg, and creates a Web...
1
by: Gonzalo Aguirre | last post by:
hi.. as i write on the topic, i'm programing a Bash script using the standard GNU Linux text utilities (gawk, grep, sed, and so on) that get information from SQL source (table attib, type per...
7
by: Robin Becker | last post by:
I wonder if this is the right way to write a medusa(asyncore) server with the win32all framework. Other example services seem to create an event to pass the stop signal from SvcStop into a separate...
0
by: Jeremy Moles | last post by:
I wrote something real quick this morning that I thought might be somewhat useful to someone else. It's just a bash script that lets you do a few things do a "project directory" (in my case, python...
16
by: John Salerno | last post by:
Hi all. I just installed Ubuntu and I'm learning how to use the bash shell. Aside from the normal commands you can use, I was wondering if it's possible to use Python from the terminal instead of...
4
by: prakashsurya | last post by:
i need your help for writing javascript for date of birth.in dis we are using seperate drop down menus for date,month and year.....so wat are d validations to b considered 2 overcome dis.......
1
docdiesel
by: docdiesel | last post by:
Hi all, I've got a bash / shell script that has to validate an input whether it's an IP address or not. So far my code works as follows: MYCHECK=` echo ${IPADDR:0:15} | sed "s/\{1,3\}//g" ` ...
0
alpnz
by: alpnz | last post by:
I keep getting an error on the windows login of the following script. Any ideas anyone? #!/bin/sh #A script to move files across a network, which has strict firewalling, and only one gateway...
3
by: bollweevil | last post by:
Hello Everyone, I do Django web development on my Mac at home, and then I rsync the files with the Ubuntu web server. I want to write one single bash shell script that rsyncs the files and...
1
by: dongjune | last post by:
#!/bin/bash count=0 L=$1 K=($2+100)/100 R=$(echo $expr(1/12)**($K) | bc -l) N=$(echo "($L*$R) - $3" | bc -l) until ; do let count=count+1 done echo $count
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.