Sponsored Content
Top Forums Shell Programming and Scripting Concatenate files to one file with naming convention Post 302495625 by krbala1985 on Thursday 10th of February 2011 06:15:42 PM
Old 02-10-2011
Quote:
Originally Posted by Chubler_XL
How about this, should work in bash or ksh

Code:
MAX=0
for file in wrk/[0-9]*.CLT
do
     CNT=${file##wrk/}
     CNT=${CNT%%.CLT}
     [ $CNT -gt $MAX ] && MAX=$CNT
     LIST="$LIST $file"
done
let MAX=MAX+1
cat $LIST > ${MAX}.CLT


Thanks ..it is working fine....but i am telling with current date and number. pls check.

---------- Post updated at 06:15 PM ---------- Previous update was at 06:13 PM ----------

Quote:
Originally Posted by rdcwayx
Ok, if the understand is right.

Code:
Last=$(ls *.CLT|sort -n |tail -1)
let new=${Last%.*}+1            #determine the next consecutive number.
cat *.CLT > $new.CLT


Thanks...out put is 110210021.CLT(means currentdate0021)..Please check
 

10 More Discussions You Might Find Interesting

1. UNIX Desktop Questions & Answers

Naming convention for Libraries..

Hi All, I need to know standard naming convention for Unix libraries (including all flavours of unix)..As I have gone through some sites and found out The UNIX convention for naming of libraries is lib<name>.so.<major>.<minor>.<revision> so is it statndard . also does it change... (0 Replies)
Discussion started by: rkshukla14
0 Replies

2. Shell Programming and Scripting

Insert file names when concatenate files into a file

Hi I found the following line would concatenate all test_01 test_02 test_03 files into "bigfile". cat test_* >> bigfile But, what I'm looking for a way to insert each file names in order when concatenated in "bigfile". Thank you samky2005 (2 Replies)
Discussion started by: samky2005
2 Replies

3. Shell Programming and Scripting

Naming convention script

OK, so a quick background: I am a sys admin for a 1:1 deployment in academia with Macbooks, totaling around 6,000. Macbooks get shifted around from building to building and go to and from the repair center if hardware repair is needed. Often, some machines will get moved from one building to... (8 Replies)
Discussion started by: tlarkin
8 Replies

4. Hardware

Motherboards naming convention

For the selection of motherboards, is there any naming convention in the type numbers? There is usually a brand name and sometimes a version name, but more essential details like form factor, SATA speed and maximum amount of RAM is never given. Is there a reason for that? Is there any background... (2 Replies)
Discussion started by: figaro
2 Replies

5. Fedora

Basic question regarding rpm naming convention.

Hi Guys, Where would i find the list of distribution codes. For example. samba-32bit-3.4.2 -1.1.3.1.x8664.rpm In above rpm file it is indicated that its release is 1.1.3.1 . The rpm is meant to be run for opensuse. Where would i get the linking of release number and distribution. ... (2 Replies)
Discussion started by: pinga123
2 Replies

6. UNIX for Dummies Questions & Answers

Check file name against convention

I need this script to check if the first 3 letters of the file name are capital. find . -type f -name *001.dpx -exec find {} ! -name ???_???_???_v??.??????.dpx \; >> ./Bad_FileNames.txt Currently it finds the first frame of the sequence and tests that against the naming convention. It works... (6 Replies)
Discussion started by: scribling
6 Replies

7. Red Hat

File System Naming Convention

Hi, I am installing a new RHEL 5 application server containing JBOSS along with other specific 3rd party applications. I know that this usually gets installed in /opt but I was thinking of installing these on a new separtate lv / file system instead. i.e. /<my_new_FS_name> rather than... (6 Replies)
Discussion started by: Duffs22
6 Replies

8. Shell Programming and Scripting

Concatenate many files which contents the same date as part of name file

Gents, I have lot of files in a folder where each file name includes the date of generation, then I would like to merge all the files for each date in a complete file. list of files in forder. dsd01_121104.txt dsd01_121105.txt dsd01_121106.txt dsd03_121104.txt dsd03_121105.txt... (7 Replies)
Discussion started by: jiam912
7 Replies

9. Shell Programming and Scripting

How to concatenate the files based upon the file name?

Hi Experts, I am trying to merge multiple files into one file based upon the file name. Testreport_Server1.txt ============ MonitoringReport_Server1.txt============ CentralReport_Server1 Here two files containing server1 should be merged into one file? How can i do... (16 Replies)
Discussion started by: sharsour
16 Replies

10. Shell Programming and Scripting

Change the naming convention of the output file

Hi Currently we have nmon running on our Red hat Linux server. The ouput file is now coming with the naming convention as "servername_160321_0010.nmon". The output file naming convention has to be changed as "nmon_servername_daily_2016.03.21_00.00.00" How can we do it ? Any suggestions... (10 Replies)
Discussion started by: newtoaixos
10 Replies
GUS(4)							   BSD Kernel Interfaces Manual 						    GUS(4)

NAME
gus -- Gravis UltraSound/UltraSound MAX audio device driver SYNOPSIS
gus0 at isa? port 0xPPP irq X drq Y drq2 Z audio* at audiobus? DESCRIPTION
The gus driver provides support for the Gravis UltraSound (GUS) and GUS MAX audio cards. Both cards have on-board memory which is used for seamless playback of samples. They can play back 8- or 16-bit samples at up to 44.1kHz. They can record 8-bit samples at up to 44.1kHz. The UltraSound MAX is a full-duplex sound device, and if configured with two DRQ channels can be used for simultaneous playback and record- ing. The I/O port base is jumper-selected, and may be chosen from 0x210-0x260 in steps of 0x10. (The normal setting is 0x220.) The GUS takes 16 ports at its base address and 8 ports at its base address + 0x100. The IRQ is software programmed, so you may select any IRQ from the set {3,5,7,9,11,12,15}. The DRQ lines are software programmed, and may be chosen from {1,3,5,6,7}. The drq2 field in the configuration file line specifies a second DRQ line for recording. If there is no drq2 field in the config file, the playback channel will be used for recording DMA and only half-duplex mode will be available. The Gravis UltraSound MAX has an additional CODEC onboard which is addressed with four ports at an offset of 0x10C from the base ports (0x31C-0x36C). SEE ALSO
audio(4) REFERENCES
Gravis UltraSound Low-Level Toolkit, Revision 2.01, 20 May 1993, published by Advanced Gravis and Forte Technologies. HISTORY
The gus device driver appeared in NetBSD 1.1. BUGS
The full-duplex features of the GUS MAX have not been fully tested, and full-duplex on the original GUS may not be possible at all. Only two voices on the GF1 synthesizer chip are used by this driver (for left and right channels). Manipulating the mixer while audio samples are playing can lead to device driver confusion (and maybe even a system panic). Manipulating the mixer device seems to create pregnant system pauses, probably due to excessive interrupt masking. The joystick and MIDI port interfaces are not supported. BSD
June 22, 2005 BSD
All times are GMT -4. The time now is 02:06 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy