Sponsored Content
Top Forums Shell Programming and Scripting Script that delete a File when a DEL File will be placed in same folder Post 302438202 by Bjoern28 on Monday 19th of July 2010 05:24:50 AM
Old 07-19-2010
ah OK.. thanks Smilie

Will try it with CD
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash script to delete folder based on text file information

I have been working on a script to list all the name's of a subfolder in a text file then edit that text file and then delete the subfolder base on the edited text file so far I have been able to do every thing I just talked about but can't figure out how to delete the subfolers base on a text file... (8 Replies)
Discussion started by: bone11409
8 Replies

2. UNIX for Dummies Questions & Answers

Delete file from folder

Hi all, I amd new in UNIX programming. I have a query. I need to delete some files (like .dec files) from some folders. I have a list of folders. What will be command for it. Please help me. Thanks in Advance. (6 Replies)
Discussion started by: eclairs
6 Replies

3. Shell Programming and Scripting

A script to find dir, delete files in, and then del dir?

Hello!! I have directories from 2008, with files in them. I want to create a script that will find the directoried from 2008 (example directory: drwxr-xr-x 2 isplan users 1024 Nov 21 2008 FILES_112108), delete the files within those directories and then delete the directories... (3 Replies)
Discussion started by: bigben1220
3 Replies

4. Shell Programming and Scripting

rsync delete single file from the target folder

Hi We want to delete a single file from the destiantion directory using rsync. Is it possible to do this ? or Do we have any alternate approaches in rsync( for ex applying some filters ..etc) For ex: ----------------------------------------------- Source (Folder) ... (3 Replies)
Discussion started by: MVEERA
3 Replies

5. Shell Programming and Scripting

not del a file not affecting other permissions

i was faced by a question from a friend. i found it very tricky. all my months of learning unix i never can figure it out still. heres the question he faced me with. wondering if you all can help me figure a solution. ill let him know the forums helped me out :D What command would you use... (10 Replies)
Discussion started by: sunny231
10 Replies

6. UNIX for Dummies Questions & Answers

To delete the oldest files in a file when file count in the folder exceeds 7

Hi All, I need to delete the oldest file in folder when the file count in the folder exceed 6 ( i have a process that puts the source files into this folder ) E.x : Folder : /data/opt/backup 01/01/2012 a.txt 01/02/2012 b.txt ... (1 Reply)
Discussion started by: akshay01987
1 Replies

7. Shell Programming and Scripting

How to delete more than 7 days file from Target folder?

Hi Team, I have to remove files which are more than 7 days in my target directory. I have this script but using this i faced some problems like, removed library files of unix. for abc in `find /xxx/abc/OutputFiles/xxxx_*.txt -type f -mtime +5|xargs ls 1` do echo "xxx files are:"$abc ... (1 Reply)
Discussion started by: harris
1 Replies

8. Shell Programming and Scripting

Del: line 13: syntax error: unexpected end of file

1 echo -e "Enter a filename" 2 read filename 3 if 4 then 5 echo -e "do you want to delete?" 6 read answer 7 if 8 then rm myfirst 9 else 10 echo -e "file not deleted" 11 fi 12 exit0 (1 Reply)
Discussion started by: Speedy
1 Replies

9. Homework & Coursework Questions

Oracle dump file (del format) import into db2

1. The problem statement, all variables and given/known data: are the oracle dump files compatible to direct import into db2? I already tried many times but it always truncated results. anyone can help/ advice or suggest? 2. Relevant commands, code, scripts, algorithms: exp... (3 Replies)
Discussion started by: Sonny_103024
3 Replies

10. Shell Programming and Scripting

Request for Shell script to move files from Subfolder to Parent folder and delete sub folder

Hi Team, I am new to shell script and there is a requirement where files should be moved from Subfolder to parent folder. Eg: parent folder --> /Interface/data/test/IN Sub folder -->/Interface/data/test/IN/Invoice20180607233338 Subfolder will be always with timestamp... (6 Replies)
Discussion started by: srivarun15
6 Replies
mark(1) 						      General Commands Manual							   mark(1)

NAME
mark - mark messages (only available within the message handling system, mh) SYNOPSIS
mark [+folder] [msgs] [options] OPTIONS
Adds messages to sequences. The mark command takes the messages specified by the msgs argument, and adds them to the sequence named by using the -sequence name option. If no msgs argument is given, the current message is added to the sequence. This option can also be used in conjunction with the -zero option. This option cannot be used in conjunction with the -delete or -list options. If you attempt to use two or more of these options together, mark takes the last occurrence of any of them, and ignores any previous occurrences. Deletes messages from sequences. The mark command removes the messages specified by the msgs argument from the named sequences. As with -add, the sequences are specified using the -sequence name option. If no msgs argument is given, the current message is removed from the named sequences. This option can also be used in conjunction with the -zero option. This option cannot be used in conjunction with the -add or -list options. If you attempt to use two or more of these options together, mark takes the last occurrence of any of them, and ignores any previous occurrences. Prints a list of the valid options to this command. Lists the sequences defined for the current folder and the messages associated with those sequences. If you wish to list only particular sequences in a folder, you can specify them by using the -sequence name option. If you do not use this option, mark lists all the sequences in the current folder. You can also list sequences in another folder by using the +folder argu- ment. This option cannot be used in conjunction with the -add or -delete options. If you attempt to use two or more of these options together, mark takes the last occurrence of any of them, and ignores any previous occurrences. The mark command automatically lists the sequences in the folder unless you use the -add or -delete options, or unless you give a msgs argument. Indicates that the sequence being created should be made readable for other MH users. When you use the -add option to create a sequence, the -public option makes the sequence public, that is, readable to other MH users. By contrast, the -nopublic option indicates that the sequence should be private, or exclusive to your own MH environment. Specifies the sequence(s) you wish to list or modify. You use this option in conjunction with the -add, -delete, and -list options, to name the sequences you wish to add messages to, delete messages from, or list. You can name more than one sequence by listing the names with a space separating them; you do not need to repeat -sequence before each sequence name. Modifies the behavior of the -add and -delete options. If you use the -zero option with -add, all messages are removed from the named sequence before the new messages are added to it. This means that the sequence contains only the new messages that you have just added. The -nozero option simply adds the new mes- sages to the existing sequence, without deleting any of the messages already in the sequence. This is the default behavior. If you use -zero with -delete, all of the messages in the folder are added to the named sequence, and then the messages you specify are deleted from the sequence. This means that the sequence contains all the messages in the folder except those that you have named. The -nozero option simply removes the messages you specify from the sequence, leaving the rest of the contents of the sequence intact. This is the default behavior. The defaults for this command are: +folder defaults to the current folder msgs defaults to the current message (or all messages if -list is specified) -add if a msgs argument is specified, -list otherwise -nopublic if the folder is read-only, -public otherwise -nozero DESCRIPTION
Use the mark command to assign a name to a sequence of messages within the current folder. A sequence is a number of messages that are grouped together under a name. You can then use that name with any MH command instead of a mes- sage number, to perform the command on all the messages in the sequence. You can still continue to handle messages individually when they belong to a sequence, just as you did before. Sequences are specific to a particular folder. You can use the same name for sequences in different folders without causing problems. By default, mark operates on the sequences in the current folder. You can specify another folder by using the +folder argument. When you create a sequence using mark, the ordering of messages within the folder remains unchanged. So if messages 3, 7 and 9 are put into the sequence, they are still numbered as messages 3, 7 and 9 when you use scan to list the contents of the folder. The scan command does not show you what sequences messages belong to; you must use mark to find this information. The mark command is used only to modify sequences, not messages. If you delete a message from a sequence using mark, it remains in the folder. However, when a message is deleted or moved from a folder (for example, using rmm(1) or refile(1)), it is removed from all the sequences in that folder. RESTRICTIONS
MH allows a maximum of ten sequences in any folder. The names of sequences must consist entirely of alphabetic or numeric characters, and must begin with an alphabetic character. Punctuation is not allowed. In addition, certain names are reserved for use by MH. These include first, next, prev, and cur. PROFILE COMPONENTS
Path: To determine your Mail directory EXAMPLES
The first example shows how mark lists all the sequences in a named folder: % mark cur: 20 Admail: 1 5 9-12 test: 3-7 This output is identical to that produced by using the -list option. The next example creates a sequence called odd, containing the first five odd-numbered messages: % mark -add -sequence odd 1 3 5 7 9% mark cur: 20 Admail: 1 5 9-12 odd: 1 3 5 7 9 test: 3-7 The next example deletes message 3 from the sequences test and odd: % mark -delete -sequence test odd 3% mark cur: 20 Admail: 1 5 9-12 odd: 1 5 7 9 test: 4-7 The final example illustrates how the -zero option works with -add. All messages are first removed from the sequence test, and then messages 1 to 3 are added. The result is that test contains only messages 1 to 3: % mark -add -zero -sequence test 1-3 % mark cur: 20 Admail: 1 5 9-12 odd: 1 5 7 9 test: 1-3 FILES
The user profile. SEE ALSO
folder(1), pick(1), sortm(1) mark(1)
All times are GMT -4. The time now is 06:01 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy