Sponsored Content
Operating Systems SCO Long file names within shell script Post 302987365 by trolley on Thursday 8th of December 2016 12:07:20 PM
Old 12-08-2016
Not sure how I resolve my issue. I was trying many things and it just finally worked. I was using the following code;

Code:
mv $filxfr/*.edi  $filtmp/.
for RPTFIL in `ls`
do
    mv $RPTFIL FLXRPT.DAT
    rpt999
       .
       .
       .
done

In the filxfr directory, I had zip and text files. So the above code would not work. I made sure the text files were in another directory for processing. I later found an error in my subroutine (ie. rpt999) that was not looking in the correct directory.

Again, I am not sure this helps. I would have posted this last night, but I thought it would not be helpful. That is why I wanted to delete my original post. I am a firm believer in sharing results or ideas.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

linux question, pardon, on long file names

Sorry, hope no one minds the linux question here, I use both unix and linux, and have come across a problem. On my linux box i have a dual boot, and i've set it up so i can access my windows data partition while in linux mode (mount the vfat partition), but linux doesn't recognize long file names,... (2 Replies)
Discussion started by: kymberm
2 Replies

2. Windows & DOS: Issues & Discussions

Dos window, long file names prob

At the dos command prompt, does anyone remember how to make it recognize long file names? ie, windows long file names for folders, my documents, if i'm at the :> prompt and want to change to that directory, how do i make it skip the space? I've tried cd "my document" cd my\documents cd 'my... (4 Replies)
Discussion started by: kymberm
4 Replies

3. Solaris

mkisofs and long file names

Well im using mkisofs to create iso images in Solaris 10 and then i use cdrw -i to burn the images to the cd the problem which i noticed recent ( im new to mkisofs) i noticed its break the long file names making them shorter i searched in its help and i find two parameters one -l and one... (2 Replies)
Discussion started by: XP_2600
2 Replies

4. UNIX for Dummies Questions & Answers

Displaying VERY long process names with ps -ef

Hi, I'm trying to display all process on an AIX server with the string SLRServer in them. Normally "ps -ef|grep SLRServer" would be sufficient, however in this instance the process name is enormous and the part which contains this string has been truncated, as you can see in the example below ... (8 Replies)
Discussion started by: m223464
8 Replies

5. Shell Programming and Scripting

Reading file names from a file and executing the relative file from shell script

Hi How can i dynamically read files names from a list file and execute them from a single shell script. Please help its urgent Thanks in Advance (4 Replies)
Discussion started by: anushilrai
4 Replies

6. Shell Programming and Scripting

Dealing with spaces in file names in a shell script

Hi, What's the best way to find all files under a directory - including ones with space - in order to apply a command to each of them. For instance I want get a list of files under a directory and generate a checksum for each file. Here's the csh script: #!/bin/csh set files = `find $1... (5 Replies)
Discussion started by: same1290
5 Replies

7. Shell Programming and Scripting

Renaming file names in a shell script

I want to write a shell script that will rename all the file names to today's date attached to it.. so for example i have a file names like file1.sales.20081201.txt.c zbrs.salestxtn.20091101.txt.inn then it will rename both the files with todays date to it so the file names get changed... (1 Reply)
Discussion started by: rudoraj
1 Replies

8. Shell Programming and Scripting

want only file names (not whole path) in shell script

hi i wrote following script, #!/usr/bin/sh for index in `ls /tmp/common/*.txt` do echo "$index" done here index is giving full path but in my program i want only file names (not along with whole path) Eg. if in /tmp/common files are a.txt and b.txt den out should be a.txt b.txt ... (6 Replies)
Discussion started by: crackthehit007
6 Replies

9. Shell Programming and Scripting

Find and rename long file names (html)

Hi Guys, I need a help. I have 1130 zip files. Each one of them has files including 1 html file with long file name (includes special charactors, Alphabetic and numbers). I have copied all 1130 zip files to my linux system and extracted using below command. Find . -name "*.zip" -exec... (7 Replies)
Discussion started by: Rajmani
7 Replies

10. UNIX for Advanced & Expert Users

script regarding listing long group names

Hello, When listing the file systems (using ls -ltr) , if the group names are longer the group name is getting truncated. Can someone help with the script which would display the truncated group name? I appreciate if someone could help in this regard. (1 Reply)
Discussion started by: mike12
1 Replies
Sub::WrapPackages(3pm)					User Contributed Perl Documentation				    Sub::WrapPackages(3pm)

NAME
Sub::WrapPackages - add pre- and post-execution wrappers around all the subroutines in packages or around individual subs SYNOPSIS
use Sub::WrapPackages packages => [qw(Foo Bar Baz::*)], # wrap all subs in Foo and Bar # and any Baz::* packages subs => [qw(Barf::a, Barf::b)], # wrap these two subs as well wrap_inherited => 1, # and wrap any methods # inherited by Foo, Bar, or # Baz::* pre => sub { print "called $_[0] with params ". join(', ', @_[1..$#_])." "; }, post => sub { print "$_[0] returned $_[1] "; }; COMPATIBILITY
While this module does broadly the same job as the 1.x versions did, the interface may have changed incompatibly. Sorry. Hopefully it'll be more maintainable and slightly less crazily magical. Also, caller() should now work properly, ignoring wrappings. DESCRIPTION
This module installs pre- and post- execution subroutines for the subroutines or packages you specify. The pre-execution subroutine is passed the wrapped subroutine's name and all its arguments. The post-execution subroutine is passed the wrapped sub's name and its results. The return values from the pre- and post- subs are ignored, and they are called in the same context (void, scalar or list) as the calling code asked for. Normal usage is to pass a bunch of parameters when the module is used. However, you can also call Sub::WrapPackages::wrapsubs with the same parameters. PARAMETERS
Either pass parameters on loading the module, as above, or pass them to ... the wrapsubs subroutine the subs arrayref In the synopsis above, you will see two named parameters, "subs" and "packages". Any subroutine mentioned in "subs" will be wrapped. Any subroutines mentioned in 'subs' must already exist - ie their modules must be loaded - at the time you try to wrap them. the packages arrayref Any package mentioned here will have all its subroutines wrapped, including any that it imports at load-time. Packages can be loaded in any order - they don't have to already be loaded for Sub::WrapPackages to work its magic. You can specify wildcard packages. Anything ending in ::* is assumed to be such. For example, if you specify Orchard::Tree::*, then that matches Orchard::Tree, Orchard::Tree::Pear, Orchard::Apple::KingstonBlack etc, but not - of course - Pine::Tree or My::Orchard::Tree. Note, however, that if a module exports a subroutine at load-time using "import" then that sub will be wrapped in the exporting module but not in the importing module. This is because import() runs before we get a chance to fiddle with things. Sorry. Deferred wrapping of subs in packages that aren't yet loaded works via a subroutine inserted in @INC. This means that if you mess around with @INC, eg by inserting a directoy at the beginning of the path, the magic might not get a chance to run. If you "use lib" to mess with @INC though, it should work, as I've over-ridden lib's import() method. That said, code this funky has no right to work. Use with caution! wrap_inherited In conjunction with the "packages" arrayref, this wraps all calls to inherited methods made through those packages. If you call those methods directly in the superclass then they are not affected - unless they're wrapped in the superclass of course. pre and post References to the subroutines you want to use as wrappers. BUGS
AUTOLOAD and DESTROY are not treated as being special. I'm not sure whether they should be or not. If you use wrap_inherited but classes change their inheritance tree at run-time, then very bad things will happen. VERY BAD THINGS. So don't do that. You shouldn't be doing that anyway. Mind you, you shouldn't be doing the things that this module does either. BAD PROGRAMMER, NO BIKKIT! If you find any other lurking horrors, please report them using <https://rt.cpan.org/Public/Dist/Display.html?Name=Sub-WrapPackages>. FEEDBACK
I like to know who's using my code. All comments, including constructive criticism, are welcome. Please email me. SOURCE CODE REPOSITORY
<http://www.cantrell.org.uk/cgit/cgit.cgi/perlmodules/> COPYRIGHT and LICENCE Copyright 2003-2009 David Cantrell <david@cantrell.org.uk> This software is free-as-in-speech software, and may be used, distributed, and modified under the terms of either the GNU General Public Licence version 2 or the Artistic Licence. It's up to you which one you use. The full text of the licences can be found in the files GPL2.txt and ARTISTIC.txt, respectively. THANKS TO
Thanks to Tom Hukins for sending in a test case for the situation when a class and a subclass are both defined in the same file, and for prompting me to support inherited methods; to Dagfinn Ilmari Mannsaker for help with the craziness for fiddling with modules that haven't yet been loaded; to Lee Johnson for reporting a bug caused by perl 5.10's constant.pm being Far Too Clever, and providing a patch and test; to Adam Trickett who thought this was a jolly good idea; and to Ed Summers, whose code for figgering out what functions a package contains I borrowed out of Acme::Voodoo. perl v5.10.1 2010-03-06 Sub::WrapPackages(3pm)
All times are GMT -4. The time now is 03:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy