Sponsored Content
Full Discussion: Check file extension
Top Forums Shell Programming and Scripting Check file extension Post 302101036 by sharifhere on Wednesday 27th of December 2006 05:39:00 AM
Old 12-27-2006
Fiel Extension

Hi Maha,

Prob this shud help u.

/scripts/scr-bk-04-dec:>var=temp.cts
/scripts/scr-bk-04-dec:>echo $var | cut -d "." -f2
cts
/scripts/scr-bk-04-dec:>

Thanks,
Sharif.S
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

filename extension check - regular expression

How to compare the file name for "zip" or "ZIP" extension. I can put one more || condition to check the upper case in the below: if ]; then Is there any better way to compare using regular expressions. Thx in advance. (4 Replies)
Discussion started by: devs
4 Replies

2. Shell Programming and Scripting

How do i check whether a file has extension?

Hi, How do i check whether a file has extension? I need to code a script that will check whether a file has extension or not. Say a file Rpt200 If the file doesn't have an extenion, I need to rename the file with .txt extension. For example Rpt200 will become Rpt200.txt Please advice. ... (2 Replies)
Discussion started by: sunday8
2 Replies

3. Shell Programming and Scripting

How to check that passed parameters all have the same extension?

$ ls monkey.txt banana.csv tree.txt $ myscript monkey.txt tree.txt All extensions ARE alike. $ myscript *txt All extensions ARE alike. $ myscript monkey.txt banana.csv All extensions are NOT alike. $ myscript * All extensions are NOT alike. My brain has given up; what's the simplest... (11 Replies)
Discussion started by: cs03dmj
11 Replies

4. UNIX for Dummies Questions & Answers

About the file extension

Hi everyone, Can we know that which type of file is there without opening a file thanks in advance.... kunal patil (3 Replies)
Discussion started by: kunalpatil09
3 Replies

5. UNIX for Dummies Questions & Answers

creating separate directories according to file extension and keeping file in different directory as

unix program to which a directory name will be passed as parameter. This directory will contain files with various extensions. This script will create directories with the names of the extention of the files and then put the files in the corresponding folder. All files which do not have any... (2 Replies)
Discussion started by: Deekay.p
2 Replies

6. Shell Programming and Scripting

Getting the file extension

I have a file n06-z30-sr65-rgdt0p25-varp0.25-8x6drw-test.cmod and I want to get the extension. At the moment I have set filextension = `echo $f | awk 'BEGIN {FS="."} {print $2}'` which of course does not work as there is a point in varp0.25 (13 Replies)
Discussion started by: kristinu
13 Replies

7. Shell Programming and Scripting

Check for file with a particular extension in a particular directory

Hi, I have a directory which I am passing in my script as a parameter. Parameter name has been set to $TCH_FILE_DIRECTORY. I want to know if there's atleast 1 (or more) files in this directory with the extension '.tch'. How can I find this using ksh. (4 Replies)
Discussion started by: Bhavesh Sharma
4 Replies

8. UNIX for Dummies Questions & Answers

Display the .csv extension files based on .done extension fine

Hi All, I want to fetch the files based on .done file and display the .csv files and Wil take .csv files for processing. 1.I need to display the .done files from the directory. 2.next i need to search for the .Csv files based on .done file.then move .csv files for the one directory ... (2 Replies)
Discussion started by: girija.g6
2 Replies

9. UNIX for Dummies Questions & Answers

File Extension Missing in file-$var.csv

I'm afraid this is a silly question but I can't figure it out. I have a script like so... echo "Enter DRDL Signature Version Number" read DRDL_Number mv signature_output.csv SERVICE_OBJECTS_S-$DRDL_Number.csv The resultant filename does not contain the .csv as follows.... (3 Replies)
Discussion started by: Cludgie
3 Replies

10. Shell Programming and Scripting

Rename specific file extension in directory with match to another file in bash

I have a specific set (all ending with .bam) of downloaded files in a directory /home/cmccabe/Desktop/NGS/API/2-15-2016. What I am trying to do is use a match to $2 in name to rename the downloaded files. To make things a more involved the date of the folder is unique and in the header of name... (1 Reply)
Discussion started by: cmccabe
1 Replies
WCSREMAP(1)							   User Commands						       WCSREMAP(1)

NAME
wcsremap - AME SYNOPSIS
remap [-vf][-a rot][[-b][-j] ra dec][-i bits][-l num] file1.fit file2.fit ... filen.fit DESCRIPTION
Remap FITS or IRAF images into single FITS image using WCS or : remap [-vf][-a rot][[-b][-j] ra dec][-i bits][-l num] @filelist -a: Output rotation angle in degrees (default 0) -b ra dec: Output center in B1950 (FK4) RA and Dec -e long lat: Output center in ecliptic longitude and latitude -f file: Use WCS from this file as output WCS -g long lat: Output center in galactic longitude and latitude -i num: Number of bits per output pixel (default is input) -j ra dec: center in J2000 (FK5) RA and Dec -l num: Log every num rows of output image -m mode: c closest pixel (more to come) -n num: integer pixel value for blank pixel -o name: Name for output image -p secpix: Output plate scale in arcsec/pixel (default =input) -s: Set BZERO and BSCALE in output file from input file -t: Number of samples per linear output pixel -u: Delete distortion keywords from output file -v: Verbose -w type: Output WCS type (input is default) -x x y: Output image reference X and Y coordinates (default is center) -y nx ny: Output image dimensions (default is first input image) wcsremap 3.8.4 June 2012 WCSREMAP(1)
All times are GMT -4. The time now is 02:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy