Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How can I ... (Modifying large ASCII files) Post 4136 by hviktor on Thursday 19th of July 2001 08:37:39 AM
Old 07-19-2001
Question How can I ... (Modifying large ASCII files)

Hi Everybody!

Situation:
I have a large ASCII file (for example: 1-2 Mbytes) without linebreaks (\n).

Task:
I like inserting linebreaks after all 420 digits (byte).
(pattern: *[420pcs]\n*[420pcs]\n*[420pcs]\n...etc.)

My problem:
How? :-)
I like using shell script or (maybe) AWK (short) program.

Please, help me.

Bye
hviktor
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl - Appending/Modifying Excel files

Hi I have been using Spreadsheet::ParseExcel and Spreadsheet::WriteExcel to read and write excel workbooks, respectively. Spreadsheet::WriteExcel can only be used for creating new excel spreadsheets. I am looking for a module that would/should help me in appending to existing excel files.... (2 Replies)
Discussion started by: srinivay
2 Replies

2. Shell Programming and Scripting

modifying grep to get files only within last 2 hrs

Hi gurus I am currently using the below mentioned grep to find timestamp of last generated log file. touch -t $time_search dummy ecust_time_stamp=$(find . -name 'eCustomerCME*' -newer dummy -type f -exec ls -ltr {} \; | tail -1 | awk ' { print $6,$7,$8 } ') I calculate... (3 Replies)
Discussion started by: ragha81
3 Replies

3. Shell Programming and Scripting

Modifying command for Tar.gz Files.

:) Hi, I use the following command to search for a string in all the files in the directories and sub directories. find . -type f -print | xargs grep bermun@cial.net Can someone please cite a method wherin I can find the entries from a list of 300-500 *.gz files by modifying the above... (2 Replies)
Discussion started by: openspark
2 Replies

4. UNIX for Advanced & Expert Users

Formatting large Ascii file

Hi, I've got a very large ASCII file (1.5 GB), which doesn't have line terminators, making it impossible to read it right, i need to format it like: add line terminators. delete some lines on the file. delete some fields on all the remainings lines (can be identified by a string). After... (4 Replies)
Discussion started by: fahoo
4 Replies

5. Shell Programming and Scripting

.bashrc files modifying the PS1 variable?

Is there a command for finding all files on the system named ".bashrc" that modify the PS1 variable? I'd like to list the full file name(s) and the protection (including the full path). (5 Replies)
Discussion started by: raidkridley
5 Replies

6. Shell Programming and Scripting

modifying grep to return latest files

Hi guys, I currently use the below mwntioned grep statemen to get the timestamp of the last generated file in the directory. (ls -ltr eCustomerCME* | grep ^- | tail -1 | awk ' { print $6,$7,$8 } ') I need to modify this grep to search for files generated only within last 2 hrs. Can you pls... (5 Replies)
Discussion started by: ragha81
5 Replies

7. Shell Programming and Scripting

modifying xml files using sed

Hello, I have lots of xml files in the same format and I need to modify a xml tag in these files. i loop over the files and apply sed to the files to make the modification but CPU goes to %100 while doing this. I think I'm doing something wrong. Here is my onliner: for f in $( find . -name... (1 Reply)
Discussion started by: xyzt
1 Replies

8. Shell Programming and Scripting

Help with modifying files

Hello everyone, I have some data files, with mixed header formats. the sample for the same is: >ABCD76567.x1 AGTCGATCGTAGTCGTAGCTGT >ABCD76567.y1 AGTCGATCGTAGTCGTAGCTGT >ABCD76568.x1 pair_info:898989 AGTCGATCGTAGTCGTAGCTGT >ABCD76568.y1 pair_info:893489 AGTCGATCGTAGTCGTAGCTGT... (2 Replies)
Discussion started by: ad23
2 Replies

9. Shell Programming and Scripting

Modifying Variables in Files

hi list, I am currently looking to develop an installation script which writes out .conf files based on existing .conf files according to variables which are set in a settings file. For example I have a settings file like so: ip=192.168.1.1 hosts=localAnd I want to read a file which... (3 Replies)
Discussion started by: landossa
3 Replies

10. Shell Programming and Scripting

New code for modifying text files in a folder

Hi I want to create a code that can do this for all text files in a folder. The filenames are all listed in the following syntax UNIQUEID-LABID_ - .txt Each file has a unique ID and a different name and the content in the file looks like this: Kinship Analysis Report --- Likelihood... (12 Replies)
Discussion started by: kylle345
12 Replies
IGAWK(1)							 Utility Commands							  IGAWK(1)

NAME
igawk - gawk with include files SYNOPSIS
igawk [ all gawk options ] -f program-file [ -- ] file ... igawk [ all gawk options ] [ -- ] program-text file ... DESCRIPTION
Igawk is a simple shell script that adds the ability to have ``include files'' to gawk(1). AWK programs for igawk are the same as for gawk, except that, in addition, you may have lines like @include getopt.awk in your program to include the file getopt.awk from either the current directory or one of the other directories in the search path. OPTIONS
See gawk(1) for a full description of the AWK language and the options that gawk supports. EXAMPLES
cat << EOF > test.awk @include getopt.awk BEGIN { while (getopt(ARGC, ARGV, "am:q") != -1) ... } EOF igawk -f test.awk SEE ALSO
gawk(1) Effective AWK Programming, Edition 1.0, published by the Free Software Foundation, 1995. AUTHOR
Arnold Robbins (arnold@skeeve.com). ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +--------------------+-----------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +--------------------+-----------------+ |Availability | SUNWgawk | +--------------------+-----------------+ |Interface Stability | Volatile | +--------------------+-----------------+ NOTES
Source for gawk is available on http://opensolaris.org. Free Software Foundation Nov 3 1999 IGAWK(1)
All times are GMT -4. The time now is 07:11 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy