Sponsored Content
Top Forums Shell Programming and Scripting Split the file with renaming. Post 302757775 by PikK45 on Friday 18th of January 2013 03:08:09 AM
Old 01-18-2013
Code:
FIRST=1
FILE=1
SPL=50000
while [ $SPL -le `wc -l activity.log.20130114`]
do
sed -n '$FIRST,$SPLp' activity.log.20130114 > activity.log.20130114.seg{$FILE}
FIRST=`expr $FIRST + 50000`
SPL=`expr $SPL + 50000`
FILE=`expr $FILE + 1`
done

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Split a file with no pattern -- Split, Csplit, Awk

I have gone through all the threads in the forum and tested out different things. I am trying to split a 3GB file into multiple files. Some files are even larger than this. For example: split -l 3000000 filename.txt This is very slow and it splits the file with 3 million records in each... (10 Replies)
Discussion started by: madhunk
10 Replies

2. Shell Programming and Scripting

Renaming a file

I am a complete Unix newbie and I need some help! (Please...) I need to rename a file from the following format: Test_Test_EAR_1234.ear To the following: Test_Test_EAR.ear In other words, I need to remove everything after & including the final underscore up to the "." What is the best... (6 Replies)
Discussion started by: VeloLisa
6 Replies

3. Shell Programming and Scripting

Renaming a file use another file as a sequence calling a shl

have this shl that will FTP a file from the a directory in windows to UNIX, It get the name of the file stored in this variable $UpLoadFileName then put in the local directory LocalDir="${MPATH}/xxxxx/dat_files" that part seems to be working, but then I need to take that file and rename, I am using... (3 Replies)
Discussion started by: rechever
3 Replies

4. Shell Programming and Scripting

File renaming from list of names contained in another file

I have to rename a large number of files so that the name of each file corresponds to a code number that is given side by side in a list (textfile). The list contains in column A the filename of the actual files to be renamed and in column B the name (a client code, 9 digits) that has to be... (7 Replies)
Discussion started by: netfreighter
7 Replies

5. Shell Programming and Scripting

renaming files using split with a delimiter

I have a directory of files that I need to rename by splitting the first and second halves of the filenames using the delimiter "-O" and then renaming with the second half first, followed by two underscores and then the first half. For example, natfinal1995annvol1_14.pdf -O filenum-20639 will be... (2 Replies)
Discussion started by: swimulator
2 Replies

6. Shell Programming and Scripting

Renaming file

Hello, I have an outstanding issue..Iam on linux and using a putty to connect to my server and then fire our unix shell script. At location /usr/sam a file called "er 1 32.txt" out boss transfer via application. From my end on terminal when i want to transfer this file to some other location... (2 Replies)
Discussion started by: j_panky
2 Replies

7. UNIX for Dummies Questions & Answers

Need help with Renaming a file

I have a file named as Pro_PatAct_MMDDYYYY.csv. I need to renmae it to this Pro_PatAct.csv without the date timestamp. Can someone help me to achieve this using a regular expn. (3 Replies)
Discussion started by: imran_affu
3 Replies

8. Shell Programming and Scripting

renaming the default output name of the split command

Hello, I would like to split a file but I dont what the subfiles to be named the way they are: ex: default name: xaa xab xac xad xae desired name: b01 b02 b03 b04 b05 I know I can rename them afterwards however I have a varialbe split lenghth, in other words I am not sure how... (2 Replies)
Discussion started by: smarones
2 Replies

9. UNIX for Dummies Questions & Answers

Renaming File

Hi there, I have 350 files in this directory: /home/adams/29 that was mistakenly renamed in this format: TTFILE_BIT_638478.txt.dat I want to take out the trailing .dat so that it ends in .txt: TTFILE_BIT_638478.txt I need help please. Thank you. (6 Replies)
Discussion started by: Creems
6 Replies

10. Shell Programming and Scripting

Renaming file and check for the renamed file existence

Hi Am trying to move a file from one name to another When I do "ls" to check for the moved filename I can see the file but when I try the same with a script am unable.. I think am doing some pretty silly error.. please help.. toMove=`ls | grep -E "partition.+"` mv $toMove partition._org... (7 Replies)
Discussion started by: Priya Amaresh
7 Replies
vme_manual_setup(7)					 Miscellaneous Information Manual				       vme_manual_setup(7)

NAME
vme_manual_setup, sys_attrs_vba_vipvic - Describes how to set up VIP/VIC-based Alpha VME systems for use on the VMEbus, including how to modify attributes of the vba_vipvic kernel subsystem DESCRIPTION
VMEbus setup allows you to run the operating system on the following VIP/VIC-based AXPvme and Alpha VME systems: AXPvme single-board computers (SBCs) Alpha VME 4/224 and 4/228 SBCs Alpha VME 5/352 and 5/480 SBCs Alpha VME 2100 system For information about installing the operating system on the listed systems, see the Installation Guide. For information about setting up UNIVERSE II-based Alpha VME systems for use on the VMEbus, see the sys_attrs_vba_univ(7) reference page. See System Configuration Supplement: OEM Platforms for detailed information about the use of the VMEbus on the listed systems, including the following topics: Configuring the vba_vipvic subsystem Configuring VMEbus A32 and A24 address spaces Configuring the VMEbus A16 address space Configuring VMEbus interrupts Using VMEbus hardware byte-swapping modes Sharing memory between big endian and little endian proces- sors Performing VMEbus slave block transfers Performing VMEbus master block transfers with local DMA Using the realtime interrupt-handling routine rt_post_callout The defaults supplied for various VMEbus parameters are listed below. The default values specified should provide proper VMEbus operation for most applications. Be careful when modifying these values; not all adapters support all fields. Parameter Default Meaning -------------------------------------------------------------------- VME_Br_Lev 0x03 Bus request level 3 for master cycles VIC_Arb_Mode 0x00 Arbitration mode is round robin VME_Fair_Req 0x00 VMEbus fair requester disabled VIC_Loc_Bus_To 0x05 Local bus timeout period is 256 microseconds VME_Bus_To 0x06 VMEbus timeout period is 512 microseconds VIC_Rel_Mode 0 Release mode is release on request (ROR) VIC_Syscon 1 System controller VMEbus reset is enabled VIC_Wrt_Post 0 Disable VIC master write posting VIC_DMA_Intrlv 15 DMA interleave gap is 3.75 microseconds (value * 250 nanoseconds) Lmt_DMA_Rd 0 No DMA read limit Lmt_DMA_Wrt 0 No DMA write limit Frce_Hw_DMA 0 Do not force hardware DMA engine fo SMP system A32_Base 0x08000000 A32 inbound DMA window base address A32_Size 0x8000000 A32 window size (128 MB) A24_Base 0x00C00000 A24 inbound DMA window base address A24_Size 0x400000 A24 window size (4 MB) A16_Base 0x00000100 A16 interprocessor communication base address A16_Mask 0x00000000 A16 interprocessor communication mask A24_A32_Ovrlap 1 Inbound A24/A32, if same space, overlap The following VMEbus interrupt parameters provide initial defaults that are later overwritten by system priority level (SPL) values sup- plied by the platform. See the values listed in System Configuration Supplement: OEM Platforms, or query the values at run time using the command sysconfig -q vba_vipvic. Parameter Default Meaning -------------------------------------------------------------------- Irq0_SPL 3 VMEbus IRQ level to system SPL map Irq1_SPL 3 VMEbus IRQ 1 to SPL SPLDEVLOW Irq2_SPL 3 VMEbus IRQ 2 to SPL SPLDEVLOW Irq3_SPL 3 VMEbus IRQ 3 to SPL SPLDEVLOW Irq4_SPL 3 VMEbus IRQ 4 to SPL SPLDEVLOW Irq5_SPL 3 VMEbus IRQ 5 to SPL SPLDEVLOW Irq6_SPL 3 VMEbus IRQ 6 to SPL SPLDEVLOW Irq7_SPL 3 VMEbus IRQ 7 to SPL SPLDEVLOW Adapt_Blk_SPL 3 Adapter resource blocking SPL SPLDEVLOW DMA_Access_Space 0 Adapter MBLT I/O access: sparse RELATED INFORMATION
Interfaces: sys_attrs_vme_vba(7), sys_attrs_vba_univ(7), sysconfigdb(8), sys_attrs(5) System Configuration Supplement: OEM Platforms, Device Driver Kit manual Writing VMEbus Device Drivers delim off vme_manual_setup(7)
All times are GMT -4. The time now is 05:08 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy