Sponsored Content
Full Discussion: Copy down based on condition
Top Forums Shell Programming and Scripting Copy down based on condition Post 302939604 by matrixmadhan on Friday 27th of March 2015 01:55:57 AM
Old 03-27-2015
I think you should show us what have you tried so far and what is the problem with the approach
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to search then remove based on condition

Folks; I'm trying to write a script to scan through a directory tree then for each file it finds, it run a command line tool, then if the results include the word "DONE", it removes the file. In more details; i have a Linux directory tree such as "/opt/grid/1022/store" I'm trying to write a... (6 Replies)
Discussion started by: Katkota
6 Replies

2. Shell Programming and Scripting

transpose based on condition

Hi, I have the oracle table coulns in an order like date, state1, state2....state9 and i need to prepare data from the script output for loading in to this table The script is #!/bin/ksh /usr/xpg4/bin/awk -F"-" '{print $2,$4}' /aemu/ErrorLogs/data/MissingCGIcount.txt |... (5 Replies)
Discussion started by: aemunathan
5 Replies

3. Shell Programming and Scripting

Copy input file based on condition

Hi, I am new to unix shell programming. I want to write a shell script for a functionality existing in mainframe system. I have one file as below as input 123456 &__987 &12yuq abcdef _ referes to blank condition:whenever the input file is having &__ ,it should be replaced... (4 Replies)
Discussion started by: charan0703
4 Replies

4. Shell Programming and Scripting

Condition based concatenation.

Hello, I am looking for concatenating the lines based on conditions. Below are the contents of the file: Infile: ----- Test1.PO_Itm COLUMN GAC_DT. Test1.PO_Itm COLUMN (PRODTCD ,PLNTCD). Test1.PO_Itm COLUMN PLNTCD. Test1.PO_Itm COLUMN ACTVIND. Test2.RgnToTerrtryGPI COLUMN... (3 Replies)
Discussion started by: indrajit_u
3 Replies

5. Shell Programming and Scripting

Comment based on a condition

I want to comment 2 lines based on a condition. If THEN occurs immediately after WHEN then i have to comment both the lunes For example : $cat file1.txt CASE WHEN THEN 1 WHEN c1= 'I' AND c2= '0' THEN 2 So in this example i want to... (2 Replies)
Discussion started by: ashwin3086
2 Replies

6. Shell Programming and Scripting

Copy file to two folders with condition

Hello! Please, help me write this simple script using bash scripting. Task: In Folder1 I have files: name1.txt, name2.txt, name3.txt .. etc In Folder2 may located such files: name1.txt, name2.txt .. etc In Folder3 may located files like: name1.txt_abc{some_symbols}_vxz,... (6 Replies)
Discussion started by: optik77
6 Replies

7. Shell Programming and Scripting

How can I change file value based on condition

Hi, Gurus, I got a problem to resolve following issue: I have one file file1as following: start_dt=2010-01-01 12:00:02 start_dt=2011-01-01 09:00:02 start_dt=2009-01-01 11:00:02I have another file file2 as following: title1, 2010-01-03 10:00:02 title2, 2011-01-04 11:00:02 title3,... (5 Replies)
Discussion started by: ken002
5 Replies

8. Shell Programming and Scripting

extracting lines based on condition and copy to another file

hi i have an input file that contains some thing like this aaa acc aa abc1 1232 aaa abc2.... poo awq aa abc1 aaa aaa abc2 bbb bcc bb abc1 3214 bbb abc3.... bab bbc bz abc1 3214 bbb abc3.... vvv ssa as abc1 o09 aaa abc4.... azx aaq aa abc1 900 aqq abc19.... aaa aa aaaa abc1 899 aa... (8 Replies)
Discussion started by: anurupa777
8 Replies

9. UNIX for Dummies Questions & Answers

Condition based on Timestamp (Date/Time based) from logfile (Epoch seconds)

Below is the sample logfile: Userids Date Time acb Checkout time: 2013-11-20 17:00 axy Checkout time: 2013-11-22 12:00 der Checkout time: 2013-11-17 17:00 xyz Checkout time: 2013-11-19 16:00 ddd Checkout time: 2013-11-21 16:00 aaa Checkout... (9 Replies)
Discussion started by: asjaiswal
9 Replies

10. Shell Programming and Scripting

Extract batch based on condition

HI, I have a file as mentioned below. Here one batch is for one user id.Batch starts from |T row and ends at .T row. I want to create a new file by reading this file. The condition is for record 10(position 1-2), if position 3 to position 17 is 0 then delete the entire batch and write into the new... (9 Replies)
Discussion started by: abhi.mit32
9 Replies
show(1) 						      General Commands Manual							   show(1)

NAME
show - show (list) messages (only available within the message handling system, mh) SYNOPSIS
show [+folder] [msgs] [-draft] [-[no]header] [-help] [-showproc program] [-noshowproc] [options to showproc] OPTIONS
Displays the draft message, or the current message in your +drafts folder, if you have one set up. You cannot give a msgs argument when you use this option. Displays a one-line header before the message. The header consists of the name of the folder and the message number. This is the default behavior. It can be suppressed with the -noheader option. Prints a list of the valid options to this command. Specifies an alternative program to list messages. The default is to use the program defined by the showproc: entry in the file. You can give options to the showproc program at the command line. These are passed directly to showproc by show. (If you specify an option that has a numerical value, leave no space between the argument and the value. See RESTRICTIONS for more information.) If the -noshowproc option is specified, /bin/cat is used instead of showproc. The MH command mhl can be used as a showproc to show messages in a more uniform format. See mhl(1) for more details. If you are going to use the same showproc all the time, it is advisable to specify it in your file. See mh_profile(4) for more details. The defaults for this command are as follows: +folder defaults to the current folder msgs defaults to the current message -header DESCRIPTION
Use show to display the contents of the current message. You can specify alternative messages or folders by using the +folder or msgs argu- ments. If a folder is given, it becomes the current folder. The last message shown becomes the current message. You can specify a number of messages or a range of messages using the msgs argument. If you specify more than one message, show prompts for a <RETURN> prior to listing each message. Typically, the messages are listed exactly as they are, with no reformatting. A program named by the showproc component in the file is invoked to do the listing, and any options not recognized by show are passed along to that program. The default program is more(1). By default, the show command use the more program to list each message, a page at a time. When the end of the page is reached, it waits for a <RETURN> or a space. If you press <RETURN>, show prints the next line. If you press the space bar, it prints the next screen of data. At the end of the message, show automatically returns you to the system prompt. Press q to quit before the end of the message. If the profile entry Unseen-Sequence: is present and non-empty, then show will remove each of the messages shown from the sequences named by the profile entry. RESTRICTIONS
The -header option does not work when msgs expands to more than one message. If the showproc is mhl, then this problem can be circumvented by referencing the messagename field in the mhl format file. The command show updates your mail environment before showing the message. Hence show may mark messages as seen before you actually see them. However, this is generally not a problem, unless you are using the unseen messages mechanism, and you interrupt show while it is showing unseen messages. If you use the showproc switch to specify an alternative viewer, leave no space between the options specified with the viewer and their values. For example, if you want to use the more command to scroll through messages 6 through 10 in your inbox folder, and you want to pause every five lines, you would enter the following command, where there is no space between the option n and the value 5: % show +inbox 6-10 -showproc more -n5 If there is space between the option n and the value 5, the command interprets 5 as a message number to view. If your showprocviewer is mhl, then show uses a built-in mhl: it does not actually run the mhl program. Hence, if you define your own show- proc, do not call it mhl since show will not run it. If more(1) is your showproc (which is the default), then avoid running show in the background with only its standard output piped to another process. You should re-direct the diagnostic output of show as well For example, in the following incorrect example, show will go into a tty input state: % show | print & For users of csh, the correct command is: % show |& print & For users of sh, the correct command is: % show 2>&1 | print & PROFILE COMPONENTS
Path: To determine the user's Mail directory Unseen-Sequence: To name sequences denoting unseen messages showproc: Program to show messages EXAMPLES
In the first example, show displays the contents of message 36 in the current folder: % show 36 In the next example, the pr(1) program is used to list the current message: % show -showproc pr FILES
The user profile. SEE ALSO
more(1), mhl(1), next(1), pick(1), prev(1), scan(1) show(1)
All times are GMT -4. The time now is 08:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy