Sponsored Content
Full Discussion: For loop using LABEL
Top Forums Shell Programming and Scripting For loop using LABEL Post 302865315 by renuk on Friday 18th of October 2013 07:12:36 AM
Old 10-18-2013
For loop using LABEL

Hi,

i have below code so i want to run only one for loop instead of two.

Code:
if [ $SLS_COUNT -gt 0 ]; then
                FILE_NAME_SLS=`cat $FILE_PATH|grep 'GTDA_Dly_Sls_'`
                DELMT="|"
                for i in $FILE_NAME_SLS
                do
                ABaC_COL_SL=`cut -d "$DELMT" -f18,19 "$i"|sort -u`
                RM_ABaC_COL_SL=$DELMT""$ABaC_COL_SL
                sed -n 's/'"$RM_ABaC_COL_SL"'//p' $i> $WORK_AREA_PATH/TDA_FILES/$i
                done
                echo " GTDA sales done"
fi

if [ $PMIX_COUNT -gt 0 ]; then
                FILE_NAME_PMIX=`cat $FILE_PATH|grep 'GTDA_Dly_Pmix_'`
                DELMT="|"
                for i in $FILE_NAME_PMIX
                do
                ABaC_COL_PM=`cut -d "$DELMT" -f12,13 "$i"|sort -u`
                RM_ABaC_COL_PM=$DELMT""$ABaC_COL_PM
                sed -n 's/'"$RM_ABaC_COL_PM"'//p' $i> $WORK_AREA_PATH/TDA_FILES/$i
                done
                echo " GTDA Pmix done"
fi

Thanks in advance!!!

Last edited by Scrutinizer; 10-18-2013 at 08:29 AM.. Reason: changed icode tags to regular code tags
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Solaris 8 label command

I have a RAID 5 set that is 100GB. i recently added more disks to the RAID so its now 225GB. In order for Solaris to recognize the new disk size i was told to lable the disk again. the disk is under Veritas Vol Mgr and File Sys control will i lose data if i do this? (3 Replies)
Discussion started by: justalogin01
3 Replies

2. AIX

Label:scan_error_chrp

Am getting an error in error log LABEL: SCAN_ERROR_CHRP IDENTIFIER: BFE4C025 Date/Time: Wed May 17 10:49:32 CUT Sequence Number: 6738 Machine Id: 00CD552E4C00 Node Id: dbs104 Class: H Type: PERM Resource Name: sysplanar0 Resource Class:... (0 Replies)
Discussion started by: vjm
0 Replies

3. AIX

Label: Disk_err4

I was trying to access my filesystem "tools" but couldn't, so I run fsck, but says Unable to read superblock (TERMINATED) when try mounting says mount: /dev/lv01 on /tools: I/O error the state of logical volumes of rootvg are "open/stale", what does it means? LV NAME TYPE ... (4 Replies)
Discussion started by: andwhat
4 Replies

4. HP-UX

Label printing help

Hi I need some help in label printing with Zebra printers. (Model 220xiII) Here is a small test label file which prints fine in portrait format. Can anyone tell me how to change the label printing mode to landscape format? HEADER;TESTLBL;1;1;5;4... (0 Replies)
Discussion started by: rpalghat
0 Replies

5. AIX

Label: Fcp_array_err4

In errpt i have got the following error and my database performs slow. --------------------------------------------------------------------------- LABEL: FCP_ARRAY_ERR4 IDENTIFIER: D5385D18 Date/Time: Tue Jul 22 10:50:10 CUT Sequence Number: 193913 Machine Id: ... (1 Reply)
Discussion started by: vjm
1 Replies

6. UNIX for Advanced & Expert Users

how to write volume label / ID into CD

I've a peculiar requirement that, i want to write the md5sum of the ISO image in to CD or DVD where i write that ISO. If you want to write some other information as volume label/ID, we can use the mkisofs command's -V option. But i cannot use this because before the creation of the iso file,... (0 Replies)
Discussion started by: thegeek
0 Replies

7. Shell Programming and Scripting

Using A Goto Label?

Im trying to do something like this but I cant find any documentation. read X if then goto ThisLine fi OTHER CODE OTHER CODE Label: ThisLine echo "You entered 1" (5 Replies)
Discussion started by: Grizzly
5 Replies

8. Solaris

Help:"Bad checksum in disk label" and "Can't open disk label package"?

Hello, I'm brand new to Sun/Solaris. I have a Sun Blade 150, with SunOS 5.8. I wanted to make a backup to prevent future data loss, so I put the disk in a normal PC with Windows XP to try to make a backup with Norton Ghost, the disk was detected, but not the file volume, so I place the disk... (6 Replies)
Discussion started by: Resadija
6 Replies

9. UNIX for Dummies Questions & Answers

How to read a disk label?

Hi there, I'm wondering how to display a disk label (why not edit it but I don't need that yet). I found several commands on forums like disklabel and diskinfo but I can't find them on my system and don't know the package they belong to. Can you help me? Cheers Santiago (2 Replies)
Discussion started by: chebarbudo
2 Replies

10. AIX

Which IP label is used for HeartBeating?

Hi, In HACMP, which IP label ( Service/ Boot/ Persisten) is used for send/receive Heartbeat packets in IP based Heartbeating? (1 Reply)
Discussion started by: ksgnathan
1 Replies
ZGREP(1)						      General Commands Manual							  ZGREP(1)

NAME
zgrep - search possibly compressed files for a regular expression SYNOPSIS
zgrep [ grep_options ] [ -e ] pattern filename... DESCRIPTION
Zgrep invokes grep on compressed or gzipped files. These grep options will cause zgrep to terminate with an error code: (-[drRzZ]|--di*|--exc*|--inc*|--rec*|--nu*). All other options specified are passed directly to grep. If no file is specified, then the standard input is decompressed if necessary and fed to grep. Otherwise the given files are uncompressed if necessary and fed to grep. If the GREP environment variable is set, zgrep uses it as the grep program to be invoked. EXIT CODE
2 - An option that is not supported was specified. AUTHOR
Charles Levert (charles@comm.polymtl.ca) SEE ALSO
grep(1), gzexe(1), gzip(1), zdiff(1), zforce(1), zmore(1), znew(1) ZGREP(1)
All times are GMT -4. The time now is 09:52 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy