Sponsored Content
Top Forums Shell Programming and Scripting how to check prefix and postfix Post 302185872 by krishmaths on Wednesday 16th of April 2008 04:05:59 AM
Old 04-16-2008
Code:
if [ `basename $1 .XYZ` = $1 ]
then
 exit #no XYZ suffix
else
 echo "extn XYZ found"
fi

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

remove filename prefix

I've got a bunch of files called oldabc, olddef etc. i want to copy these to be abc, def.... I can do this with file extensions....but can get the logic to work for prefixes. All the files I am interested in have a prefix of 'old'. This loop is no good for me....it looks at the content... (2 Replies)
Discussion started by: peter.herlihy
2 Replies

2. Shell Programming and Scripting

Check if a file exists with certain prefix

Hi guys, How would i check a file exists with certainprefix? i have a directory with some files: ABC1 ABC2 ABC3 etc.. and want to do: please note i am using the korn shell environment.As when i gone through some stuff on then net i came to know some of the options will work... (11 Replies)
Discussion started by: raoscb
11 Replies

3. UNIX for Dummies Questions & Answers

--prefix question

OK, now I just feel plain silly asking this. But I am very much a beginner at compiling and installing Unix software, so... When setting the prefix, do you also have to specify the directory the files reside in? For example, lets say I am installing cURL in /usr/local Would I set the prefix... (1 Reply)
Discussion started by: RobertSubnet
1 Replies

4. Shell Programming and Scripting

Remove prefix using awk

Remove prefix using awk File: nawk -F"|" '{if ($1 ~ /^xyz./) print; else { gsub(.*\..*, \..*, $1) ;print }}' file Error: ouput required: (5 Replies)
Discussion started by: pinnacle
5 Replies

5. IP Networking

postfix - reinject mail to postfix from hold queue directory

hi all. Am using smtpd_recipient_restrictions & check_recipient_access in postfix. The hash file looks like this: emailaddress1 HOLD emailaddress2 HOLD The aim is to place email from these recipients in the hold directory,check them then reinject them back in postfix on some... (0 Replies)
Discussion started by: coolatt
0 Replies

6. UNIX for Dummies Questions & Answers

Please help with Postfix config issue - How to allow remote Exchange server to relay to my postfix

Hi guys One of our clients have a problem with sending email to a certain domain. No matter what we try, the mails just dont get delivered. What I did then, is created a new connector on their Exchange server, pointing all mail sent to their client at "domain1" to relay to our Postfix mail... (0 Replies)
Discussion started by: wbdevilliers
0 Replies

7. Shell Programming and Scripting

check postfix deferred mail and send notification script

Hi Guys, I have a postfix server which is deferring emails. Now I need to send notification to a specific email address if: The sender of the deferred email is: abc@example.com Contains specific subjects: a file (/opt/subjects) contains all the subjects in place Then need to send a... (0 Replies)
Discussion started by: linuxrulz
0 Replies

8. UNIX and Linux Applications

Postfix: Active Directory and postfix alias

I have a mailserver with postfix i want to alias all mail for administrator@domain.fqdn to root@domain.fqdn I have the aliases configured,and i did newliases but doesn't work. How to did this?Postfix is configured for virtual domain on ad server. (2 Replies)
Discussion started by: Linusolaradm1
2 Replies

9. UNIX for Advanced & Expert Users

Prefix/Suffix on same file

Hi, I want to add prefix and suffix on line# 205 using SED or AWK and want to change on the same file without creating new file. This command will be used in the bash script Am using Bash shell Regards Nayaj (3 Replies)
Discussion started by: Nayaj
3 Replies

10. Shell Programming and Scripting

Extract Uniq prefix from a start and end prefix

Dear All, assume i have a file with content: <Start>6000</Start> <Stop>7599</Stop> the output is: 6000 7000 7100 7200 7300 7400 7599 how should we use any awk, sed, perl can do this task, means to extract the uniq prefixes from the start and stop prefix. Thanks Jimmy (3 Replies)
Discussion started by: jimmy_y
3 Replies
mlib_ImageColorXYZ2RGB_Fp(3MLIB)			    mediaLib Library Functions				  mlib_ImageColorXYZ2RGB_Fp(3MLIB)

NAME
mlib_ImageColorXYZ2RGB_Fp - XYZ to RGB color conversion SYNOPSIS
cc [ flag... ] file... -lmlib [ library... ] #include <mlib.h> mlib_status mlib_ImageColorXYZ2RGB_Fp(mlib_image *dst, const mlib_image *src); DESCRIPTION
The mlib_ImageColorXYZ2RGB_Fp() function performs a color space conversion from CIE XYZ to ITU-R Rec.708 RGB with D64 white point. The source and destination images must be three-channel images. It uses the following equation: |R| |cmat[0] cmat[1] cmat[2]| |X| |G| = |cmat[3] cmat[4] cmat[5]| * |Y| |B| |cmat[6] cmat[7] cmat[8]| |Z| where cmat[] = { 3.240479, -1.537150, -0.498535, -0.969256, 1.875992, 0.041566, 0.055648, -0.204043, 1.057311 }; src[x][y] = { X, Y, Z }; dst[x][y] = { R, G, B }; PARAMETERS
The function takes the following arguments: dst Pointer to destination image. src Pointer to source image. RETURN VALUES
The function returns MLIB_SUCCESS if successful. Otherwise it returns MLIB_FAILURE. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Committed | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
mlib_ImageColorConvert1(3MLIB), mlib_ImageColorConvert1_Fp(3MLIB), mlib_ImageColorRGB2XYZ(3MLIB), mlib_ImageColorRGB2XYZ_Fp(3MLIB), mlib_ImageColorRGB2YCC(3MLIB), mlib_ImageColorRGB2YCC_Fp(3MLIB), mlib_ImageColorXYZ2RGB(3MLIB), attributes(5) SunOS 5.11 2 Mar 2007 mlib_ImageColorXYZ2RGB_Fp(3MLIB)
All times are GMT -4. The time now is 04:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy