Sponsored Content
Top Forums Shell Programming and Scripting Scripting to fix the issue in UNIX file having delimiter "|" Post 302759061 by Corona688 on Monday 21st of January 2013 10:21:02 AM
Old 01-21-2013
Code:
while IFS="|" read A B C D E F G
do
...
done < inputfile

 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Commands on Digital Unix equivalent to for "top" and "sar" on other Unix flavour

Hi, We have a DEC Alpha 4100 Server with OSF1 Digital Unix 4.0. Can any one tell me, if there are any commands on this Unix which are equivalent to "top" and "sar" on HP-UX or Sun Solaris ? I am particularly interested in knowing the CPU Load, what process is running on which CPU, etc. ... (1 Reply)
Discussion started by: sameerdes
1 Replies

2. Shell Programming and Scripting

Scripting multiple file "puts" in sFTP...

I need to send multiple files to a remote server via sFTP. I had everything set up to connect and send a single file automatically using a batch file and key authentication. Recently, however, the process has changed and we now need to send multiple files, one at a time, pausing for up to ten... (5 Replies)
Discussion started by: Cbish68
5 Replies

3. UNIX for Dummies Questions & Answers

Encoding Problem while using "|" (PIPE) as delimiter from Mainframe to Unix

We are facing a problem with PIPE (|) as a delimiter in one of our FTP flat files. We are constructing a Flat file in IBM-AIX and this contains various strings delimted by PIPE Symbol and then FTPing this to a Mainframe System The Mainframe program simply recieves this and FTPs the same... (1 Reply)
Discussion started by: seshendra
1 Replies

4. UNIX for Advanced & Expert Users

fsck.gfs2 outputs "RG recovery impossible; I can't fix this file system"

I have a CentOS release 5.2 (Final)host running kernel 2.6.18-92.el5 with at raid 10 that had two mirrored drives fail. The drives were re-inserted and now the raid shows healthy (for now). I tried to mount but got an Input/output error. I then attempted a fsck: fsck.gfs2 -y /dev/vg_01/uss_vol... (0 Replies)
Discussion started by: king_hippo
0 Replies

5. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

6. UNIX for Dummies Questions & Answers

Unix "look" Command "File too large" Error Message

I am trying to find lines in a text file larger than 3 Gb that start with a given string. My command looks like this: $ look "string" "/home/patrick/filename.txt" However, this gives me the following message: "look: /home/patrick/filename.txt: File too large" So, I have two... (14 Replies)
Discussion started by: shishong
14 Replies

7. Shell Programming and Scripting

""Help Me!""Beginner awk learning issue

Hi All, I have just now started learning awk from the source - Awk - A Tutorial and Introduction - by Bruce Barnett and the bad part is that I am stuck on the very first example for running the awk script. The script is as - #!/bin/sh # Linux users have to change $8 to $9 awk ' BEGIN ... (6 Replies)
Discussion started by: csrohit
6 Replies

8. Shell Programming and Scripting

Substituting comma "," for dot "." in a specific column when comma"," is a delimiter

Hi, I'm dealing with an issue and losing a lot of hours figuring out how i would solve this. I have an input file which looks like this: ('BLABLA +200-GRS','Serviço ','TarifaçãoServiço','wap.bla.us.0000000121',2985,0,55,' de conversão em escada','Dia','Domingos') ('BLABLA +200-GRR','Serviço... (6 Replies)
Discussion started by: poliver
6 Replies

9. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

10. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies
FDWRITE(1)						    BSD General Commands Manual 						FDWRITE(1)

NAME
fdwrite -- format and write floppy disks SYNOPSIS
fdwrite [-v] [-y] [-f inputfile] [-d device] DESCRIPTION
The fdwrite utility formats and writes one and more floppy disks. Any floppy disk device capable of formatting can be used. The fdwrite utility will ask the user (on /dev/tty) to insert a new floppy and press return. The device will then be opened, and queried for its parameters, then each track will be formatted, written with data from the inputfile, read back and compared. When the floppy disk is filled, the process is repeated, with the next disk. This continues until the program is interrupted or EOF is encountered on the inputfile. The options are as follows: -v Toggle verbosity on stdout. Default is ``on''. After device is opened first time the format will be printed. During operation progress will be reported with the number of tracks remaining on the current floppy disk, and the letters I, Z, F, W, R and C, which indicates completion of Input, Zero-fill, Format Write, Read and Compare of current track respec- tively. -y Do not ask for presence of a floppy disk in the drive. This non-interactive flag is useful for shell scripts. -f inputfile Input file to read. If none is given, stdin is assumed. -d device The name of the floppy device to write to. Default is /dev/fd0. The fdwrite utility actually closes the device while it waits for the user to press return, it is thus quite possible to use the drive for other purposes at this time and later resume writing with the next floppy. The parameters returned from device are used for formatting. If custom formatting is needed, please use fdformat(1) instead. EXAMPLES
The fdwrite utility was planned as a tool to make life easier when writing a set of floppies, one such use could be to write a tar-archive: tar cf -. | gzip -9 | fdwrite -d /dev/fd0.1720 -v The main difference from using tar(1)'s multivolume facility is of course the formatting of the floppies, which here is done on the fly, thus reducing the amount of work for the floppy-jockey. SEE ALSO
fdformat(1) HISTORY
The fdwrite utility was written while waiting for ``make world'' to complete. Some of the code was taken from fdformat(1). AUTHORS
The program has been contributed by Poul-Henning Kamp <phk@FreeBSD.org>. BUGS
Diagnostics are less than complete at present. If a floppy is sick, and the inputfile is seekable, it should ask the user to frisbee the disk, insert another, and rewind to the right spot and continue. This concept could be extended to cover non-seekable input also by employing a temporary file. An option (defaulting to zero) should allow the user to ask for retries in case of failure. At present a suitable tool for reading back a multivolume set of floppies is missing. Programs like tar(1) for instance, will do the job, if the data has not been compressed. One can always trust dd(1) to help out in this situation of course. BSD
September 16, 1993 BSD
All times are GMT -4. The time now is 06:30 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy