Sponsored Content
Top Forums Shell Programming and Scripting Replacing entire fields with specific text at end or beginning of field Post 302949876 by palmfrond on Friday 17th of July 2015 12:18:19 AM
Old 07-17-2015
Awesome, thanks, I get the premise!
 

10 More Discussions You Might Find Interesting

1. HP-UX

replacing text in specific location

i have a file that looks like this: 000000112/01/2008 D99999 000000 12/01/2008 D99999 000000 12/01/2008 1D99999 i need to replace the blanks into 1 for column 7,18-19 how can this be achieved using awk? Thanks. (1 Reply)
Discussion started by: zeontman
1 Replies

2. Shell Programming and Scripting

replacing a nul field with text

Ok here's my pickle. I have a file in which every line must be the same length. Each field within the line is a certain length. None of these can be changed. What I need to do is look at a specific field within this file, let's say it starts with character 30 and ends with 50. If this field is... (3 Replies)
Discussion started by: DarkHound
3 Replies

3. Shell Programming and Scripting

Remove spaces from first field, and write entire contents into other text file

Hi all, I have searched and found various threads about removing spaces from a field within a text file. Unfortunately, I have not found exactly what I'm looking for, nor am I adept enough to modify what I've found into what I need. I use the following command to remove the first line... (3 Replies)
Discussion started by: carriehoff
3 Replies

4. UNIX for Dummies Questions & Answers

Replacing a field in pipe delimited TEXT File

Hi, I want to replace a field in a text delimited file with the actual number of records in the same file. HDR|ABCD|10-13-2008 to 10-19-2008.txt|10-19-2008|XYZ DTL|0|5464-1|0|02-02-2008|02-03-2008||||F||||||||| DTL|1|5464-1|1|02-02-2008|02-03-2008|1||JJJ... (3 Replies)
Discussion started by: ravi0435
3 Replies

5. UNIX for Dummies Questions & Answers

Finding & Replacing specific Fields

All I have a very large file (aproximately 150,000) as shown below separated by pipe "|". I need to replace data in 2, 16, 17, 23 fields that are of time stamp format. My goal is to look in those fields and it ends with "000000|" then replace it with "000|". In other words, make it as 6 digit... (2 Replies)
Discussion started by: ddraj2015
2 Replies

6. Shell Programming and Scripting

replacing field in specific line in a file

Hi, I know there are lots of threads on replacing text within files, usually using sed or awk. However, I find it hard to adapt examples that I found to my specific case. I am kind of new to UNIX and have hard times learning the syntax either for sed or awk so I would appreciate any help. Here's... (5 Replies)
Discussion started by: vytenis
5 Replies

7. Shell Programming and Scripting

trying to add text to beginning and end of each line

Well here goes: I tried to write a batch file that adds a specific fixed text to each line of an already existing text file. for the adding text infront of each line I tried this: for /F "delims=" %%j in (list.txt) do echo.STARTTEXT\%%j >> list.txt for adding text after each line I... (0 Replies)
Discussion started by: pasc
0 Replies

8. Shell Programming and Scripting

sed to add field heards to specific fields

I have tab delimited input that prints out in the format below: I am trying to add field headers to $5 and $6. Not sure if sed is the best tool but my attempt is below. Thank you :). $5 = REF $6 = ALT file ID CHR START STOP 123 1 100 200 A ... (6 Replies)
Discussion started by: cmccabe
6 Replies

9. Shell Programming and Scripting

awk to combine all matching fields in input but only print line with largest value in specific field

In the below I am trying to use awk to match all the $13 values in input, which is tab-delimited, that are in $1 of gene which is just a single column of text. However only the line with the greatest $9 value in input needs to be printed. So in the example below all the MECP2 and LTBP1... (0 Replies)
Discussion started by: cmccabe
0 Replies

10. Shell Programming and Scripting

Selecting text on multiple lines, then removing a beginning and end patterns

I have a file similar to the below. I am selecting only the paragraphs with @inlineifset. I am using the following command sed '/@inlineifset/,/^ *$/!d; s/@inlineifset{mrg, @btpar{@//' $flnm >> $ofln This produces @section Correlations between seismograms,,,,}} ... (5 Replies)
Discussion started by: Danette
5 Replies
libaudiofile(3) 						C Library Functions						   libaudiofile(3)

NAME
libaudiofile - audio file library SYNOPSIS
#include <audiofile.h> #include <aupvlist.h> #include <af_vfs.h> DESCRIPTION
The audio file library provides a uniform programming interface to standard digital audio file formats. This library allows the processing of audio data to and from audio files of many common formats (currently AIFF, AIFF-C, WAVE, NeXT/Sun .snd/.au, and IRCAM). The library also supports compression (currently G.711 mu-law, A-law, IMA, and MS ADPCM) as well as PCM formats of all flavors (signed and unsigned integer, floating point and double-precision floating point). audiofile.h contains all of the public interfaces to the library. aupvlist.h contains the interfaces to the parameter value list data structures and routines. af_vfs.h should only be included if using audio file library through virtual file operations. EXTENDED DESCRIPTION
One premise of the audio file library is that the data presented to an application need not be in the same format as the data contained in the file. Another, however, is that the capabilities of the file format are exposed to the application programmer should the programmer wish to take advantage of them. To read from a file containing audio data, you typically use the following sequence of function calls: AFfilehandle afOpenFile (const char *filename, const char *mode, AFfilesetup setup); int afReadFrames (AFfilehandle, int track, void *buffer, int frameCount); int afCloseFile (AFfilehandle file); To write to a file, you typically use a similar sequence of commands: AFfilesetup afNewFileSetup (void); AFfilehandle afOpenFile (const char *filename, const char *mode, AFfilesetup setup); int afWriteFrames (AFfilehandle, int track, const void *buffer, int frameCount); int afCloseFile (AFfilehandle file); Data format transparency is achieved in the audio file library by providing the data in a virtual format. The virtual format consists of a virtual byte order and a virtual sample format. Virtual byte order is by default set to the host byte order and does not depend on the native byte order of the file format being used. Virtual sample format is by default in an uncompressed format. The current audio file library does not support the concept of a virtual sampling rate, but this may be supported in the future. At present, the audio file library supports only CCITT G.711 mu-law/A-law compression. An audio file is manipulated through the AFfilehandle opaque data type. Calls to the library are made with this file handle as an argument. When opening a file for writing, another opaque data structure called AFfilesetup is used. This structure is then passed to calls that set various file parameters at the time the file is created, such as its file type and data format. Such properties cannot be modified for an existing file. Functions The following functions are available through the library: afNewFileSetup Create a file setup structure. afFreeFileSetup Free a file setup structure. afOpenFile Create a file handle structure given a file name and optionally a file setup. afCloseFile Close an open audio file. afSyncFile Update an audio file that has been opened for writing. afSetVirtual{ByteOrder,CSetnvirtualMformat,forpaudiomdata within a specified track. afInit{ByteOrder,ChannelSetaparametersoofaan AFfilesetup structure which will be used to open an audio file for writing. afQuery Query regarding the capabilities of the audio file library. afQueryLong Query whether the data is of type long. afQueryPointer Query whether the data is of type pointer. afQueryDouble Query whether the data is of type double. afSetLoop* The group of functions that set loop parameters. afGetLoop* The group of functions that get loop parameters. afSetMark* The group of functions that set mark parameters. afGetMark* The group of functions that get mark parameters. afSetInst* The group of functions that set instrument parameters. afGetInst* The group of functions that get instrument parameters. afGetAESChannelData Get AES channel data for a given audio file. afSetAESChannelData Set AES channel data for a given audio file. afInitAESChannelData Specify that storage space is to be allocated for AES channel status data in a given audio file. afInitAESChannelDataTo Specify whether storage space is to be allocated for AES channel status data in a given audio file. FILES
The following files are used by this application: /usr/libaudiofile.so Audio file shared library /usr/include/audiofile.h Public interfaces C header file /usr/include/aupvlist.h Parameter value list C header file /usr/include/af_vfs.h Virtual File System C header file ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWgnome-audio | +-----------------------------+-----------------------------+ |Interface stability |Volatile | +-----------------------------+-----------------------------+ SEE ALSO
audiofile-config(1), libesd(3), attributes(5) NOTES
Written by Ghee Teo, Sun Microsystems Inc., 2003. This library is provided as an Open Source project by Silicon Graphics. SunOS 5.11 3 Apr2003 libaudiofile(3)
All times are GMT -4. The time now is 10:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy