Sponsored Content
Top Forums Shell Programming and Scripting Cut command not working in for loop Post 302863741 by renuk on Tuesday 15th of October 2013 04:45:55 AM
Old 10-15-2013
@pravin: files are in file_GTDA.xls and in same path.

/dm/RMDW_LandingZone/dev/work_area/ABaC_reregister> more file_GTDA.xls
GTDA_Dly_Pmix_AT_136_20130917.20130917205418.psv
GTDA_Dly_Pmix_AT_136_20130917.20130917205619.psv
GTDA_Dly_Pmix_AT_66_20130917.20130917205619.psv
GTDA_Dly_Pmix_CA_12_20130917.20130917205619.psv
GTDA_Dly_Sls_SS_136_20130917.20130917205418.psv
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Use loop var i within Cut Command

Hi, In the following bash code rather than cutting at a predefined character I would like to cut at position i (i var from loop). Is this possible? I have tried eval, but either it's not possible or my syntax is wrong. thanks Nick for i in {1..9} do theChar=$(echo... (3 Replies)
Discussion started by: de_la_espada
3 Replies

2. UNIX for Dummies Questions & Answers

Cut not working in a loop

I have a function "MyPrint" that runs great on a file (BaseData.txt) that has one line of data. If i add rows to the text file it's reading the tFile variable becomes a list of every field 2 in the file. To correct this, i tried to call the function from a loop where i read one line at a time and... (4 Replies)
Discussion started by: KME
4 Replies

3. Shell Programming and Scripting

cut the present working directory

how to traverse through each directory (1 Reply)
Discussion started by: Reddy482
1 Replies

4. UNIX for Dummies Questions & Answers

cut not working the way i want it to

Hi Forum Im having problem with cut it even when i cut a field from an input file eg echo $x | cut -f1 -d':' it doesnt read the whole line if there is a space in it eg thisLineHasA SpaceInIt :wall: it only read up to the space.What i want is so the it cut the field as one line ... (8 Replies)
Discussion started by: ShinTec
8 Replies

5. Shell Programming and Scripting

Cut Command error cut: Bad range

Hi Can anyone what I am doing wrong while using cut command. for f in *.log do logfilename=$f Log "Log file Name: $logfilename" logfile1=`basename $logfilename .log` flength=${#logfile1} Log "file length $flength" from_length=$(($flength - 15)) Log "from... (2 Replies)
Discussion started by: dgmm
2 Replies

6. UNIX for Dummies Questions & Answers

Cut command, no input delim, output delim not working

Hello, I'm using cygwin on my Windows 7 machine. From the man pages of cut: --output-delimiter=STRING use STRING as the output delimiter the default is to use the input delimiter I tried the following commands and got the error messages: $ cut -c1-10,20-30 -d... (10 Replies)
Discussion started by: kojac
10 Replies

7. UNIX for Beginners Questions & Answers

Cut command: can't make it cut fields

I'm a complete beginner in UNIX (and not a computer science student either), just undergoing a tutoring course. Trying to replicate the instructions on my own I directed output of the ls listing command (lists all files of my home directory ) to My_dir.tsv file (see the screenshot) to make use of... (9 Replies)
Discussion started by: scrutinizerix
9 Replies

8. Shell Programming and Scripting

CUT command not giving correct result inside loop

Hi, i have a source file and have 3 columns and separated by "|" .i want to split this 3 columns in different variable.When i am executing this values indivisually giving correct result but when the same execute inside a for loop,it's giving issues. Src file(jjj.txt) -------... (8 Replies)
Discussion started by: raju2016
8 Replies

9. UNIX for Beginners Questions & Answers

Mv command in for loop - not working

HI Folks - I'm very frustrated - I'm trying to execute a verys imple for loop and rename the files if they exist. here is my loop : ydate=`TZ=aaa24 date +%m%d` CR_YR=$(date "+%Y") echo $ydate echo ${CR_YR} cd... (6 Replies)
Discussion started by: SIMMS7400
6 Replies

10. Shell Programming and Scripting

Why is my cut command not working ?

OS : RHEL 6.8 Shell : bash I want to remove all lines like below from the history output as it has password. $ history | grep sqlplus 239 sqlplus jn_usr/dxc825#@10.5.12.106/OCSGPD 256 sqlplus osb_soa/KD1egM09@10.5.12.196/BSOAPRD 279 sqlplus jn_usr/dxc825#@10.80.16.219/OCSGPD... (5 Replies)
Discussion started by: John K
5 Replies
POSTSUPER(1)						      General Commands Manual						      POSTSUPER(1)

NAME
postsuper - Postfix superintendent SYNOPSIS
postsuper [-psv] [-d queue_id] [-r queue_id] [directory ...] DESCRIPTION
The postsuper command does maintenance jobs on the Postfix queue. Use of the command is restricted to the super-user. By default, postsuper performs the operations requested with the -s and -p command-line options on all Postfix queue directories - this includes the incoming, active and deferred directories with mail files and the bounce, defer and flush directories with log files. Options: -d queue_id Delete one message with the named queue ID from the named mail queue(s) (default: incoming, active and deferred). If a queue_id of - is specified, the program reads queue IDs from standard input. Specify -d ALL to remove all messages; for example, specify -d ALL deferred to delete mail in the deferred queue. As a safety mea- sure, the word ALL must be specified in upper case. Postfix queue IDs are reused. There is a very small possibility that postsuper deletes the wrong message file when it is executed while the Postfix mail system is running. The scenario is as follows: 1) The Postfix queue manager deletes the message that postsuper is supposed to delete, because Postfix is finished with the mes- sage. 2) New mail arrives, and the new message is given the same queue ID as the message that postsuper is supposed to delete. The probability for reusing a deleted queue ID is about 1 in 2**15 (the number of different microsecond values that the system clock can distinguish within a second). 3) postsuper deletes the new message, instead of the old message that it should have deleted. -p Purge old temporary files that are left over after system or software crashes. -r queue_id Requeue the message with the named queue ID from the named mail queue(s) (default: incoming, active and deferred). To requeue mul- tiple messages, specify multiple -r command-line options. Alternatively, if a queue_id of - is specified, the program reads queue IDs from standard input. Specify -r ALL to requeue all messages. As a safety measure, the word ALL must be specified in upper case. A requeued message is moved to the maildrop queue, from where it is copied by the pickup daemon to a new file whose name is guaran- teed to match the new queue file inode number. The new queue file is subjected again to mail address rewriting and substitution. This is useful when rewriting rules or virtual mappings have changed. Postfix queue IDs are reused. There is a very small possibility that postsuper requeues the wrong message file when it is executed while the Postfix mail system is running, but no harm should be done. -s Structure check and structure repair. It is highly recommended to perform this operation once before Postfix startup. o Rename files whose name does not match the message file inode number. This operation is necessary after restoring a mail queue from a different machine, or from backup media. o Move queue files that are in the wrong place in the file system hierarchy and remove subdirectories that are no longer needed. File position rearrangements are necessary after a change in the hash_queue_names and/or hash_queue_depth configura- tion parameters. -v Enable verbose logging for debugging purposes. Multiple -v options make the software increasingly verbose. DIAGNOSTICS
Problems are reported to the standard error stream and to syslogd. postsuper reports the number of messages deleted with -d, the number of messages requeued with -r, and the number of messages whose queue file name was fixed with -s. The report is written to the standard error stream and to syslogd. CONFIGURATION PARAMETERS
See the Postfix main.cf file for syntax details and for default values. hash_queue_depth Number of subdirectory levels for hashed queues. hash_queue_names The names of queues that are organized into multiple levels of subdirectories. LICENSE
The Secure Mailer license must be distributed with this software. AUTHOR(S) Wietse Venema IBM T.J. Watson Research P.O. Box 704 Yorktown Heights, NY 10598, USA POSTSUPER(1)
All times are GMT -4. The time now is 05:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy