Sponsored Content
Full Discussion: rename multi files
Operating Systems Solaris rename multi files Post 302158349 by ilan on Tuesday 15th of January 2008 05:28:30 AM
Old 01-15-2008
say you have files like below...
jordba.package1
jordba.package2
jordba.package3

use the below:
for f in jordba.*; do mv "$f" "${f#jordba.}"; done

the above for loop will make your list like...

package1
package2
package3

hope this answers!

-ilan
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

join cols from multi files into one file

Hi Fields in Files 1,2,3,4 are pipe"|" separated. Say I want to grep col1 from File1 col3 from File2 col4 from File3 and print to File4 in the following order: col3|col1|col4 what is the best way of doing this? Thanks (2 Replies)
Discussion started by: vbshuru
2 Replies

2. Shell Programming and Scripting

How to send the multi files as a attachment

Hi all, Could you please guide me to write the shell script, to send a multi file as a attachement . Thanks Murugesh (1 Reply)
Discussion started by: Murugesh
1 Replies

3. UNIX for Dummies Questions & Answers

multi part compressed files

Hi there, not sure if I am in the right place but here is my question. I have a file that is over 100mb and my host does not allow FTP of files above 100mb so I thought I would use a compression utility to compress it into smaller parts say 10mb each, upload them and then re-assemble them on... (7 Replies)
Discussion started by: gffb
7 Replies

4. UNIX for Dummies Questions & Answers

How to Delete Multi Directory and Files

I have a subdirectory which has many child directories and files in it. How can i delete them through a list (txt, rtf. xls , or any file extension) which is created by me. I can not manual delete one by one because it almost over 300 directory and over 4000 files. Any one know please help me? (5 Replies)
Discussion started by: cthinh
5 Replies

5. Shell Programming and Scripting

rename files Ax based on strings found in files Bx

Hi, I'm not very experienced in shell scripting and that's probably why I came across the following problem: I do have several hundred pairs of text files (PF00x.spl and PF00x.shd) where the first file (PF00x.spl) needs to be renamed according a string that is included in the second file... (12 Replies)
Discussion started by: inCH
12 Replies

6. Shell Programming and Scripting

How to substract selective values in multi row, multi column file (using awk or sed?)

Hi, I have a problem where I need to make this input: nameRow1a,text1a,text2a,floatValue1a,FloatValue2a,...,floatValue140a nameRow1b,text1b,text2b,floatValue1b,FloatValue2b,...,floatValue140b look like this output: nameRow1a,text1b,text2a,(floatValue1a - floatValue1b),(floatValue2a -... (4 Replies)
Discussion started by: nricardo
4 Replies

7. Shell Programming and Scripting

How to zip or rm the multi part named files?

Hello There, There are more than 1000 files in my log folder and i want to zip it to relase the space. But my method throwing syntax error due to the multi part file name, how to overcome in this ? ls -lart | grep "MDB_Kernel11.1_gwlog_SUN 22_09_2013" | awk '{print $9,$10,$11,$12}' | head... (8 Replies)
Discussion started by: gowthamakanthan
8 Replies

8. Shell Programming and Scripting

Script to unzip files and Rename the Output-files

Hi all, I have a many folders with zipped files in them. The zipped files are txt files from different folders. The txt files have the same names. If i try to find . -type f -name "*.zip" -exec cp -R {} /myhome/ZIP \; it fails since the ZIP files from different folders have the same names and... (2 Replies)
Discussion started by: pmkenya
2 Replies

9. Shell Programming and Scripting

XML Splitting into multi files

Hi , I have a XML file like below file name : sample.xml <?xml version="1.0"?> <catalog> <author>Rajini</author> <title>XML Guide</title> <Text> </Text> <genre>Computer</genre> <price>44.95</price> </catalog> <?xml version="1.0"?> <catalog> ... (5 Replies)
Discussion started by: karthinvk
5 Replies

10. Shell Programming and Scripting

SBATCH trinity for multiple files and rename/move the output files

Hey guys, I have wrote the following script to apply a module named "trinity" on my files. (it takes two input files and spit a trinity.fasta as output) #!/bin/bash -l #SBATCH -p node #SBATCH -A <projectID> #SBATCH -n 16 #SBATCH -t 7-00:00:00 #SBATCH --mem=128GB #SBATCH --mail-type=ALL... (1 Reply)
Discussion started by: @man
1 Replies
cmhaltpkg(1m)															     cmhaltpkg(1m)

NAME
cmhaltpkg - halt a high availability package SYNOPSIS
cmhaltpkg [-v] [-t] [-n node_name]... package_name... cmhaltpkg [-v] [-s] [-n node_name]... package_name... DESCRIPTION
cmhaltpkg connects to the Serviceguard cluster manager and halts the specified package(s) or multi-node package instance(s). When a package or package instance is halted, global switching (AUTO_RUN) is disabled for that package. cmhaltpkg may be run on any node within the cluster and may operate on any package within the cluster. To halt a package, a user must either be a superuser with effective user ID of zero (see id(1) and su(1)), or have an access policy of PACKAGE_ADMIN allowed in the cluster or package configuration file. See access policy in cmquerycl(1m) or cmmakepkg(1m). If no node_name arguments are supplied, each package will be halted on any and all nodes where it is running. If the package is not running on any nodes, the command will fail. cmhaltpkg should not be used to halt SYSTEM_MULTI_NODE packages (HP-UX only). Use cmhaltnode or cmhaltcl to halt SYSTEM_MULTI_NODE packages instead. Packages of other types may be halted on a subset of the configured nodes by specifying one or more node_name arguments. cmhaltpkg will fail if each specified package is not running on all the specified nodes. Packages are halted in the order required by their configured dependencies. Packages without configured dependencies are halted in the order specified on the command line. To successfully halt a package, all required dependent packages must either be previously halted or specified as a package_name argument in the cmhaltpkg command. Packages configured with STORAGE_GROUP are implicitly dependent on the cor- responding multi-node cluster volume manager (CVM) package. (HP-UX only) cmhaltpkg validates its command line prior to halting any package and returns an error if the user does not have correct access to complete the operation or if illegal combinations of node_name and package_name arguments are encountered. If a problem is detected while halting a package, cmhaltpkg exits with an error indication and remaining package_name arguments are not processed. A package in maintenance mode that was start up to and including a specified module can be halted from that specified module. Only those modules which were started are halted. Options cmhaltpkg supports the following options: -n node_name Acts only on a specific node. If the package is not running on the specified node, it will not be halted. -v Verbose output will be displayed. -t Test only. Provide an assessment of the package placement without affecting the current state of the nodes or pack- ages. This option validates the node's eligibility with respect to the package dependencies as well as the external dependencies such as EMS resources, package subnets, and storage before predicting any package placement decisions. This option is not legal for package in maintenance mode. -s Symmetric halt is only for packages in maintenance mode. If a package in maintenance mode has been started up to a module as specified by cmrunpkg -m, then cmhaltpkg -s will halt the package up to that module. Otherwise, cmhaltpkg -s will halt the package for all the modules specified in its configuration file. RETURN VALUE
cmhaltpkg returns the following value: 0 Successful completion. 1 Command failed. 2 Command failed due to a transient condition. EXAMPLES
A sequence of cmhaltpkg and cmrunpkg commands may be used to move a package from one node to another. For example, the package may be halted on one node and then run on a new node, provided that the package is enabled for the new node. To move package package1 to node node2, do the following: cmhaltpkg package1 cmrunpkg -n node2 package1 cmmodpkg -e package1 (to enable package switching, if desired) AUTHOR
cmhaltpkg was developed by HP. SEE ALSO
cmmakepkg(1m), cmquerycl(1m), cmmodpkg(1m), cmrunpkg(1m), cmviewcl(1m), cmeval(1m). Requires Optional Serviceguard Software cmhaltpkg(1m)
All times are GMT -4. The time now is 12:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy