Sponsored Content
Top Forums Shell Programming and Scripting [Solved] Split file using awk Post 302586027 by itkamaraj on Friday 30th of December 2011 02:38:47 AM
Old 12-30-2011
Code:
nawk '{a=substr($0,1,5)"_log.txt"; printf("%s\n",$0) > a}' sample.txt

 

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

split file with awk

I did a lot of search on this forum on spiting file; found a lot, but my requirement is a bit different, please guide. Master file: x:start:5 line1:23 line2:12 2:90 x:end:5 x:start:2 45:56 22:90 x:end:2 x:start:3 line1:23 line2:12 x:end:3 x:start:2 line5:23 (1 Reply)
Discussion started by: uwork72
1 Replies

3. Shell Programming and Scripting

split a file using awk

Hi , I just need to split a file and outputfiles are redirected to gzip file need: Input file - A.gz content of A.gz is 100|sfdds|dffdds|200112|sdfdf 100|sfdds|dffdds|200112|sdfdf 100|sfdds|dffdds|200112|sdfdf 100|sfdds|dffdds|200212|sdfdf 100|sfdds|dffdds|200212|sdfdf... (3 Replies)
Discussion started by: mohan_xunil
3 Replies

4. Shell Programming and Scripting

How to split a file using AWK?

Hello, I have a file like the following: david,a,b,c,20,r thomas,a,b,c,30,r willaiam,a,b,c,80,r barbara,a,b,c,100,r I would like to split the file into other files using a condition for the contents of column 5. The condition should be a if the contents of column 5 is in a range... (4 Replies)
Discussion started by: keenboy100
4 Replies

5. Shell Programming and Scripting

[Solved] Script to split a file into two

Hi i have a file like a 12 b 13 c 14 d 15 I want to split it based on a blank line like in first file I should have a 12 b 13 and in the second file I have c 14 d 15 How can i do this? Any help will be greatly appreciated (5 Replies)
Discussion started by: prarat
5 Replies

6. Shell Programming and Scripting

Split File by Pattern with File Names in Source File... Awk?

Hi all, I'm pretty new to Shell scripting and I need some help to split a source text file into multiple files. The source has a row with pattern where the file needs to be split, and the pattern row also contains the file name of the destination for that specific piece. Here is an example: ... (2 Replies)
Discussion started by: cul8er
2 Replies

7. UNIX for Dummies Questions & Answers

[Solved] Perl Question - split function with csv file

Hi all, I have a csv file that appears as follows: ,2013/03/26,2012/12/26,4,1,"2017/09/26,5.75%","2017/09/26,1,2018/09/26,1,2019/09/26,1,2020/09/26,1,2021/09/26,1",,,2012/12/26,now when i use the split function like this: my @f = split/,/; the split function will split the data that is... (2 Replies)
Discussion started by: WongSifu
2 Replies

8. Shell Programming and Scripting

awk file split

Hi all, First of all I' like to mention that I'm pretty new to unix scripting. :( I'm trying to split an large xml with awk and rename it based on the values of two attributes. Example XML <RECORD> <element1>11</element1> <element2>22</element2> <element3>33</element3>... (18 Replies)
Discussion started by: f0usk4s
18 Replies

9. UNIX for Dummies Questions & Answers

[Solved] Split one file into more than one file

Guys, I have an input file MGC001|108.28|-2.86489|100-120|MANGGAC MGC002|108.071|-2.69028|80-100|KELAPA KAMPIT MGC003|108.168|-2.97053|50-80|GANTUNG MGC007|108.192722222|-2.766138889|0-50|KELAPA KAMPIT MGC008|108.11075|-3.002666667|0-50|GANTUNG... (10 Replies)
Discussion started by: radius
10 Replies

10. UNIX for Beginners Questions & Answers

Split file using awk

I need to split the incoming source file in to multiple files using awk. Split position is (6,13) : 8 positions All the records that are greater than 20170101 and less than or equal to 20181231 should go in a split file with file name as source... (11 Replies)
Discussion started by: rosebud123
11 Replies
()																		()

NAME
ceferino - action game similar to Super Pang SYNOPSIS
ceferino ceferinosetup ceferinoeditor DESCRIPTION
The game is similar to 'Super Pang'. You are attacked by little green balls which are bouncing around and which you have to destroy with your knife. Your knife, however, is limited to being thrown upwards, so you have to get under the balls to destroy them. Even worse, if you destroy a large ball, it doesn't just vanish, but breaks apart into two smaller balls. Levels consist of little plat- forms connected by ladders, so you can go up and down or find cover if needed. USAGE
ceferinosetup With this program you can configure the game options: video mode, full screen or windowed mode, music and sounds. The configuration is stored in $HOME/.ceferino You can move through the menu using the arrow keys, return and space. ceferino This command allows to run the game. It will get the game options from $HOME/.ceferino and, after a brief introduction, will present a menu in which you can select a new game and some other things. During the game, you can use the following keys: Left Arrow - Move Left Right Arrow - Move Right x - Throw a knife z and c - Roll on the floor Up Arrow - Climb Stairs Down Arrow - Crouch The purpose of the game is to destroy all the balls and go up levels without being killed. The highest scores are stored in $HOME/.ceferinomarcas ceferinoeditor With this program you can edit the levels of the game. The data describing the new levels will be stored in $HOME/.ceferinoniveles.map You can use the mouse to modify the map. AUTHORS
The game has been written by LosersJuegos ( see http://www.losersjuegos.com.ar/ ): - Hugo Ruscitti <hugoruscitti@yahoo.com.ar> - Walter Velazquez <wgv_tattoo@yahoo.com.ar> - Gabriel Valentin <vcgdebian@yahoo.com.ar> This manual page was written for the Debian GNU/Linux system by Miriam Ruiz <little_miry@yahoo.es> (but may be used by others, of course) ()
All times are GMT -4. The time now is 05:37 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy