473,386 Members | 1,819 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,386 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 3174
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.