Sponsored Content
Top Forums Shell Programming and Scripting 4 GB delimited-textfile on ONE LINE Post 302312215 by vgersh99 on Thursday 30th of April 2009 04:06:11 PM
Old 04-30-2009
have you tried converting '|' to newLines '\n' and then reconstructing a record/line from the 17 consecutive lines?
Code:
tr '|' '\n' < myFile | nawk 'ORS=(FNR%17)?OFS:RS' OFS='|'


Last edited by vgersh99; 05-01-2009 at 01:14 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

parsing a delimited line

I have a text file of lines like: A=5|B=7|G=4|C=3|P=4|... In other words, each line is a pipe-delimited set of pairs of strings of the form "X=Y". What I want to do is find the token starting with "C", and print it and its value (so I'd want to print "C=3" in the example above). I'm... (11 Replies)
Discussion started by: monkeys
11 Replies

2. Shell Programming and Scripting

cut a string in a textfile line per line

i need to cut the string in a textfile but each line has a specific way of cutting it (different lengths) i have a for loop that gets the string line per line, then each line has to be compared: for x in `cat tmp2.txt`; do if; then echo 'BAC' elif ... (6 Replies)
Discussion started by: izuma
6 Replies

3. Shell Programming and Scripting

Get line of textfile and store it in variable

Hi! I need to do the following: (1) I wan't to extract a line of a textfile (defined by a numer) and store it into a variable... (2) ...but I want to cut out a part of the line which is between two tokens and store just this to the variable Example: BlaBlaBla Bla2Bla2Bla2 *pPointerOne;... (4 Replies)
Discussion started by: Michi21609
4 Replies

4. Shell Programming and Scripting

How to extract more than 1 line in a textfile ?

Hi, I'm starting a little project with a shell script but I'm don't know how to do it. Maybe someone can help me. I have un text file like this : I'd like to do a script who will extract from my file from @ADDLINE1@ to @ADDLINE4@ only and I have no idea how to do this. Any idea ? ... (7 Replies)
Discussion started by: Poulki
7 Replies

5. UNIX for Dummies Questions & Answers

Script to add text before the first word on a line in a textfile.

How can i make a script to add text before the first word on a line in a textfile : Example: Old line: is my place New line: this is my place Please use and tags when posting code, data or logs etc. to preserve formatting and enhance readability, thanks. (3 Replies)
Discussion started by: mjanssen
3 Replies

6. Shell Programming and Scripting

Write $line number into textfile and read from line number

Hello everyone, I don't really know anything about scripting, but I have to manage to make this script, out of necessity. #!/bin/bash while read -r line; do #I'm reading from a big wordlist instructions using $line done Is there a way to automatically write the $line number the script... (4 Replies)
Discussion started by: bobylapointe
4 Replies

7. Shell Programming and Scripting

How can i comma-delimited last field in line?

Awk gurus, Greatly appreciate for any kind of assistance from the expert community Input line: abc,11.22.33.44,xyz,7-8-9-10 pqr,111.222.333.444,wxy,1-2-3 def,22.33.44.55,stu,7-8 used the gsub function below but it changes all of the "-" delimiter: awk 'gsub("-",",")' Desired... (4 Replies)
Discussion started by: ux4me
4 Replies

8. Shell Programming and Scripting

awk print in one line after reading textfile with paragraphs

Hello everybody I have a text file which has the following format: nmm "text20140601.033954text" "text" "text" "text" , ... , "text" "text" , ... , Lat 36.3247 Lon 16.0588 Depth 8 "text", ... , "text" "text", ..., CovXX 1.65 CovYY 2.32 CovZZ 1.2 "text" , ..., "text nmm ... (6 Replies)
Discussion started by: phaethon
6 Replies

9. Shell Programming and Scripting

How to separate sorte different characters from one textfile and copy them in a new textfile?

My first post, so don't kill me :) Say i open some textfile with some example like this. on the table are handy, bread and wine Now i know exactly what is in and i want to separate and sorted it in terminal to an existing file with another 2 existing lines in like this: table plane ... (3 Replies)
Discussion started by: schwatter
3 Replies

10. Shell Programming and Scripting

How to add the line to previous line in | delimited text?

Hi All, I am new to Unix and I have one challenge and below are the details. I have pipe delimited text file in that data has span into multiple lines instead of single line. Sample data. Data should be like below for entire file. 41|216|398555|77|provided complete NP outcome data ... (21 Replies)
Discussion started by: Narasimhasss
21 Replies
pure-ftpwho(8)							     Pure-FTPd							    pure-ftpwho(8)

NAME
pure-ftpwho - Report current FTP sessions SYNTAX
pure-ftpwho [-c] [-h] [-H] [-n] [-p] [-s] [-v] [-w] [-W] [-x] DESCRIPTION
pure-ftpwho shows current Pure-FTPd client sessions. Only the system administrator may run this. Output can be text (default), HTML, XML data and parser-optimized. The server has to be compiled with --with-ftpwho to support this command. OPTIONS
-c the program is called via a web server (CGI interface) . Output is a full HTML page with the initial content-type header. This option is automatically enabled if an environment variable called GATEWAY_INTERFACE is found. This is the default if you can the program from a CGI-enabled web server (Apache, Roxen, Caudium, WN, ...) . -h Output help information and exit. -H Don't resolve host names, and only show IP addresses (faster). -n A synonym for -H. -p Output Mac OSX / GNUStep plist data. -s Output only one line per client, with only numeric data, delimited by a | character. It's not very human-readable, but it's designed for easy parsing by shell scripts (cut/sed) . '|' characters in user names or file names are quoted (|) . -v Output an ASCII table (just like the default mode), with more info. The verbose output includes the local IP, the local port, the total size of transfered files and the current number of transfered bytes. -w Output a complete HTML page (web mode). -W Output an HTML page with no header and no footer. This is an embedded mode, suitable for inline calls from CGI, SSI or PHP scripts. -x Output well-formed XML data for post-processing. FILES
/var/run/pure-ftpd/ Scoreboard directory. Should always owned by root and on a lockable filesystem. ENVIRONMENT VARIABLES
GATEWAY_INTERFACE If found, automatically run in CGI mode and output HTML data. AUTHORS
Frank DENIS <j at pureftpd dot org> SEE ALSO
ftp(1), pure-ftpd(8) pure-ftpwho(8) pure-mrtginfo(8) pure-uploadscript(8) pure-statsdecode(8) pure-pw(8) pure-quotacheck(8) pure-authd(8) RFC 959, RFC 2389, RFC 2228 and RFC 2428. Pure-FTPd team 1.0.36 pure-ftpwho(8)
All times are GMT -4. The time now is 04:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy