Sponsored Content
Top Forums Shell Programming and Scripting move filenames with to another filename without the last character ~ Post 302278453 by ayhanne on Tuesday 20th of January 2009 09:06:22 AM
Old 01-20-2009
move filenames with to another filename without the last character ~

Hi,
I need to move filenames with the following format below into filenames without the ~ like sample below. I hope you can help me create a simple unix script that will do this. Thanks in advance!

move filename from:
AIRS20081225-235641.BSP~
AIRS20081225-235648.BSP~
AIRS20081225-235640.BSP~
AIRS20081225-235641.BSP~

to:
AIRS20081225-235641.BSP
AIRS20081225-235648.BSP
AIRS20081225-235640.BSP
AIRS20081225-235641.BSP
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

how to move files into different folders based on filename

I need to move a bunch of files into folders that have the same name. I wanted to either do this with some filter command or some type of batch file that I could save that would already include all of the mv commands since I will have to do this process often. Whatever method you think is easier. ... (7 Replies)
Discussion started by: italia5
7 Replies

2. UNIX for Dummies Questions & Answers

How to copy/move to a file with a special character as the 1st char in the filename?

I am trying to create files with special characters in its filenames for testing purposes. This is on a Linux RHEL4 but this should also be applicable on a Unix shell. I am able to create files with special characters in the filenames...e.g. cp -pv foo.gif \*special.gif cp -pv foo.gif \... (6 Replies)
Discussion started by: sqa777
6 Replies

3. Shell Programming and Scripting

Move file based on filename

Hi All I need a script to manipulate files based on a filename: example filename: 66600_042706.pdf the script will create a directory 66000 only if this directory is not existing. If that directory is existing it will just move the file to 66000/666000_042706.pdf in addition, i want to... (4 Replies)
Discussion started by: aemestech
4 Replies

4. UNIX for Dummies Questions & Answers

move files according to dated filename

hi, i am new to linux and stuck to moving files according to filename. i have PDF files, named like 20110131_125023.pdf (YYYYMMDD_HHMMSS.pdf) i want to move those files to the subfolders YYYY/MM/ on monthly basis. thanks for any help... (2 Replies)
Discussion started by: igmox
2 Replies

5. Shell Programming and Scripting

How to read the filenames with space character in it

Hi, My Requirement is to read the filenames which possess space charatcer in it and pass the same file name to the other shell script as input parameter. Please provide your valuable suggestion. (5 Replies)
Discussion started by: cnraja
5 Replies

6. UNIX for Dummies Questions & Answers

Search filenames in directory, return filename only

Howdy, I am trying to search for a string within a directory, and then return the filename only, without the directory itself. I am using korn shell and the command x=$(find /XXXXX/XXXXX/XXXXX/I2 -exec grep -c "$line" {} /dev/null \;) which returns the directory and the filename: ... (4 Replies)
Discussion started by: jgrosecl
4 Replies

7. Shell Programming and Scripting

Script to compare substrings of multiple filenames and move to different directory

Hi there, I am having trouble with a script I have written, which is designed to search through a directory for a header and payload file, retrieve a string from both filenames, compare this string and if it matches make a backup of the two files then move them to a different directory for... (1 Reply)
Discussion started by: alcurry
1 Replies

8. Windows & DOS: Issues & Discussions

Move all files with pattern in filename

Well. I would love to have a way to: 1.) search a folder, lets say: X:\Files for any file that contains a "Conflict" in its filename (only!) (recursively so it searches the whole contents of the folder) 2.) Move all files to another Folder. All this under DOS. Any help... (6 Replies)
Discussion started by: pasc
6 Replies

9. Shell Programming and Scripting

Finding a certain character in a filename and count the characters up to the certain character

Hello, I do have folders containing having funny strings in their names and one space. First, I do remove the funny strings and replace the space by an underscore. find . -name '* *' | while read file; do target=`echo "$file" | sed 's/... (2 Replies)
Discussion started by: tempestas
2 Replies
SbBSPTree(3)							       Coin							      SbBSPTree(3)

NAME
SbBSPTree - The SbBSPTree class provides a binary space partitioning container. This class can be used to organize searches for 3D points or normals in a set in O(log(n)) time. SYNOPSIS
#include <Inventor/SbBSPTree.h> Public Member Functions SbBSPTree (const int maxnodepts=64, const int initsize=4) ~SbBSPTree () int numPoints () const SbVec3f getPoint (const int idx) const void getPoint (const int idx, SbVec3f &pt) const void * getUserData (const int idx) const void setUserData (const int idx, void *const data) int addPoint (const SbVec3f &pt, void *const userdata=NULL) int removePoint (const SbVec3f &pt) void removePoint (const int idx) int findPoint (const SbVec3f &pos) const int findClosest (const SbVec3f &pos) const void clear (const int initsize=4) void findPoints (const SbSphere &sphere, SbIntList &array) const int findClosest (const SbSphere &sphere, SbIntList &array) const const SbBox3f & getBBox () const const SbVec3f * getPointsArrayPtr () const void findPoints (const SbSphere &sphere, SbList< int > &array) const int findClosest (const SbSphere &sphere, SbList< int > &array) const Detailed Description The SbBSPTree class provides a binary space partitioning container. This class can be used to organize searches for 3D points or normals in a set in O(log(n)) time. Note: SbBSPTree is an extension to the original Open Inventor API. Constructor &; Destructor Documentation SbBSPTree::SbBSPTree (const intmaxnodepts = 64, const intinitsize = 4) Constructor with maxnodepts specifying the maximum number of points in a node before it must be split, and initsize is the number of initially allocated points in the growable points array. If you know approximately the number of points which will be added to the tree, it will help the performance if you supply this in initsize. SbBSPTree::~SbBSPTree () Destructor. Frees used memory. Member Function Documentation int SbBSPTree::numPoints () const Returns the number of points in the BSP tree. SbVec3f SbBSPTree::getPoint (const intidx) const Returns the point at index idx. See also: SbBSPTree::numPoints() void SbBSPTree::getPoint (const intidx, SbVec3f &pt) const This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. void * SbBSPTree::getUserData (const intidx) const Returns the user data for the point at index idx. See also: SbBSPTree::addPoint() SbBSPTree::numPoints() void SbBSPTree::setUserData (const intidx, void *constdata) Sets the user data for the point at index idx to data. See also: SbBSPTree::addPoint() SbBSPTree::numPoints() int SbBSPTree::addPoint (const SbVec3f &pt, void *constdata = NULL) Adds a new point pt to the BSP tree, and returns the index to the new point. The user data for that point will be set to data. If the point already exists in the BSP tree, the index to the old point will be returned. The user data for that point will not be changed. See also: SbBSPTree::findPoint() int SbBSPTree::removePoint (const SbVec3f &pt) Removes the point with coordinates pt, and returns the index to the removed point. -1 is returned if no point with those coordinates could be found. void SbBSPTree::removePoint (const intidx) Removes the point at index idx. See also: SbBSPTree::numPoints() int SbBSPTree::findPoint (const SbVec3f &pos) const Will search the tree, and return the index to the point with coordinates matching pos. If no such point can be found, -1 is returned. int SbBSPTree::findClosest (const SbVec3f &pos) const This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. void SbBSPTree::clear (const intinitsize = 4) Will empty all points from the BSP tree. void SbBSPTree::findPoints (const SbSphere &sphere, SbIntList &array) const Will return indices to all points inside sphere. Since: Coin 2.3 int SbBSPTree::findClosest (const SbSphere &sphere, SbIntList &arr) const Will return the index to the point closest to the center of sphere. Indices to all points inside the sphere is returned in arr. If no points can be found inside the sphere, -1 is returned. Since: Coin 2.3 const SbBox3f & SbBSPTree::getBBox () const Will return the bounding box of all points in the BSP tree. const SbVec3f * SbBSPTree::getPointsArrayPtr (void) const Returns a pointer to the array of points inserted into the BPS tree. void SbBSPTree::findPoints (const SbSphere &sphere, SbList< int > &array) const WARNING: Please don't use this function. It can cause hard to find bugs on the Windows platform if your application is linked against a different CRT than your Coin DLL. Use void findPoints(const SbSphere &sphere, SbIntList & array) instead. int SbBSPTree::findClosest (const SbSphere &sphere, SbList< int > &arr) const WARNING: Please don't use this function. It can cause hard to find bugs on the Windows platform if your application is linked against a different CRT than your Coin DLL. Use int findClosest(const SbSphere &sphere, SbIntList & arr) instead. Author Generated automatically by Doxygen for Coin from the source code. Version 3.1.3 Wed May 23 2012 SbBSPTree(3)
All times are GMT -4. The time now is 07:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy