LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-24-2016, 08:48 AM   #1
mohit sharma
LQ Newbie
 
Registered: Dec 2016
Posts: 1

Rep: Reputation: Disabled
Shell script in linux


Hi..i want to create a shell script that will delete only a zero byte .dat file (example :rcv_20122016.dat) with there trigger file (example:rcv_20122016.try) from a directory in linux using loop. Please help..
 
Old 12-27-2016, 10:38 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,831

Rep: Reputation: 8007Reputation: 8007Reputation: 8007Reputation: 8007Reputation: 8007Reputation: 8007Reputation: 8007Reputation: 8007Reputation: 8007Reputation: 8007Reputation: 8007
Quote:
Originally Posted by mohit sharma View Post
Hi..i want to create a shell script that will delete only a zero byte .dat file (example :rcv_20122016.dat) with there trigger file (example:rcv_20122016.try) from a directory in linux using loop. Please help..
Read the "Question Guidelines" link in my posting signature, and the LQ Rules. We are happy to help you, but we will not write your scripts/do your homework for you. Post what you have written/done/tried on your own, and tell us where you're stuck.

Otherwise, I suggest you look at any of the many thousands of bash scripting tutorials, where you can find sample code to search for files, and how to perform loops.
 
1 members found this post helpful.
Old 12-27-2016, 12:23 PM   #3
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
try googling key phrases and words
Quote:
delete only a zero byte files bash script linux
many examples to be seen.
 
2 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to pass command line arguments from one shell script to another shell script VijayaRaghavanLakshman Linux - Newbie 5 01-20-2012 09:12 PM
Executing a Shell script with 654 permissions inside another shell script. changusee2k Linux - Newbie 2 06-07-2011 07:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration