Conditional delete -- New glitch


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Conditional delete -- New glitch
# 8  
Old 10-04-2018
Quote:
Originally Posted by Don Cragun
Maybe I wasn't clear. The change suggested at the end of post #3 should always work; the only thing that was wrong in post #3 was my explanation of why it would work. The correct explanation of why the suggestion in post #3 gets rid of the race condition in your code is presented in post #5.
Appreciate your help Don 1SmilieSmilie
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Conditional delete

Hi Friends, I have somefiles like 20180720_1812.tar.gz 20180720_1912.tar.gz 20180720_2012.tar.gz 20180720_2112.tar.gz 20180721_0012.tar.gz 20180721_0112.tar.gz 20180721_0212.tar.gz 20180721_0312.tar.gz in a directory and so on..these files gets created every 3 hours where as... (28 Replies)
Discussion started by: onenessboy
28 Replies

2. UNIX for Beginners Questions & Answers

(g)awk conditional substitution issues when attempting to delete character

A portion of my input is as follows: 1087 IKON01,49 A WA- -1 . -1 . 0 W WA- -1 . -1 . 0 . -1 . -1 -1 -1 -1 -1 -1 W 1088 IKON01,49 A J.@QU80MW. 2... (2 Replies)
Discussion started by: jvoot
2 Replies

3. Shell Programming and Scripting

Conditional search and delete using SED / Shell script

Hi, I want to perform a conditional search and remove my search string. Input string: "abcdaabcadgfaarstab" Character to search: "a" Condition: Remove all "a" in the input string except if it is "aa" Output string: "bcdaabcdgfaarstb" Can you please help me in this? (5 Replies)
Discussion started by: dominiclajs
5 Replies

4. Shell Programming and Scripting

use statements and system glitch

hi, i have a perl script that runs as a cron job... Once in a while, the perl script fails with: Can't locate <module>.pm in @INC (@INC contains: .............) because one of the perl modules specified in the "use" statements is unavailable due to an NFS glitch. Is there some... (1 Reply)
Discussion started by: Andrewkl
1 Replies

5. Shell Programming and Scripting

If conditional

Hi, I am new to unix and shell scripting.In my script,there is a line using the "if" conditional - if && ; then do something Here "x" is a variable holding string value.If it is not equal to a comma or a string,only then I want to enter the "if" loop. But I am getting error while... (12 Replies)
Discussion started by: abhinavsinha
12 Replies

6. UNIX for Dummies Questions & Answers

If conditional

Hi, I am new to unix and shell scripting.In my script,there is a line using the "if" conditional - if && ; then do something Here "x" is a variable holding string value.If it is not equal to a comma or a string,only then I want to enter the "if" loop. But I am getting error while... (1 Reply)
Discussion started by: abhinavsinha
1 Replies

7. UNIX for Dummies Questions & Answers

conditional

conditional is not wworking can any one figure out what goes wrong xx1=`$ORACLE_HOME/bin/sqlplus -s apps/ostgapps1 2>/dev/null << EOF WHENEVER SQLERROR EXIT 1 set head off feedback off ; WHENEVER SQLERROR EXIT SQL.SQLCODE; select count(*) from CMS_INVOICE_ALL... (2 Replies)
Discussion started by: u263066
2 Replies

8. Ubuntu

Ubuntu costumized like OSX glitch

I have a laptop running Ubuntu Gusty. I have recently used applications such as AWN, Emerald, etc... to create a Mac OS X Leopard like environment. It works almost perfectly except for one little glitch. When I open most of my apps/windows, they all open with the top bar(with includes close,... (5 Replies)
Discussion started by: Texasone
5 Replies

9. Shell Programming and Scripting

need a little kick with sed, got it almost but on glitch

hi friends. yo i have a textfile with urlīs in it sometimes middle in text, sometimes one url alone is a line i append a string right behind the domain name so that http://unix.com becomes http://unix.com.APPENDTHIS on all occasions. i use this sed-line to achieve this: sed -i... (3 Replies)
Discussion started by: scarfake
3 Replies
Login or Register to Ask a Question
RMF(1)								     [nmh-1.5]								    RMF(1)

NAME
rmf - remove an nmh folder SYNOPSIS
rmf [+folder] [-interactive | -nointeractive] [-version] [-help] DESCRIPTION
Rmf removes all of the messages (files) within the specified (or default) folder, and then removes the folder (directory) itself. If there are any files within the folder which are not a part of nmh, they will not be removed, and an error will be produced. If the folder is given explicitly or the -nointeractive option is given, then the folder will be removed without confirmation. Otherwise, the user will be asked for confirmation. If rmf can't find the current folder, for some reason, the folder to be removed defaults to `+inbox' (unless overridden by user's profile entry "Inbox") with confirmation. If the folder being removed is a subfolder, the parent folder will become the new current folder, and rmf will produce a message telling the user this has happened. This provides an easy mechanism for selecting a set of messages, operating on the list, then removing the list and returning to the current folder from which the list was extracted. If rmf s used on a read-only folder, it will delete all the (private) sequences (i.e., "atr-seq-folder" entries) for this folder from your context without affecting the folder itself. Rmf irreversibly deletes messages that don't have other links, so use it with caution. FILES
$HOME/.mh_profile The user profile PROFILE COMPONENTS
Path: To determine the user's nmh directory Current-Folder: To find the default current folder Inbox: To find the default inbox SEE ALSO
rmm(1) DEFAULTS
`+folder' defaults to the current folder, usually with confirmation `-interactive' if +folder' not given, `-nointeractive' otherwise CONTEXT
Rmf will set the current folder to the parent folder if a subfolder is removed; or if the current folder is removed, it will make "inbox" current. Otherwise, it doesn't change the current folder or message. BUGS
Although intuitively one would suspect that rmf works recursively, it does not. Hence if you have a sub-folder within a folder, in order to rmf the parent, you must first rmf each of the children. MH.6.8 11 June 2012 RMF(1)