Sponsored Content
Top Forums Shell Programming and Scripting Help with shell script and sed! Post 302447925 by bartus11 on Tuesday 24th of August 2010 05:00:26 PM
Old 08-24-2010
Post exact data (or sample of it) that is in FileA, FileB, and corresponding output file, that you want to produce.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Sed command in shell script

I have a current code working(named subst1) having a user be able to type this line to substitute words using the sed command: subst1 old-pattern new-pattern filename Here is my shell script: #!/bin/bash # subst1 ARGS=3 E_BADARGS=65 if then echo "Usage: `basename $0`... (1 Reply)
Discussion started by: Todd88
1 Replies

2. Shell Programming and Scripting

shell script by sed

Hey everybody I need some help on how to order the data in file such as a file have first name last name and city and i would like to order them to in the same order by using sed thanks alot for your time (6 Replies)
Discussion started by: halola85
6 Replies

3. UNIX for Dummies Questions & Answers

shell script - sed

Hi i have a problem how to put som lines on top or in the bottom of the text with sed. problem is that i am reading from stdin and when i have som lines starting with ++, i have to put some characters on the top of the lines starting with that ++ example of input oooo ++abcd ++befg... (1 Reply)
Discussion started by: Dun
1 Replies

4. Shell Programming and Scripting

using sed in shell script

Hi all, I have files with the following names; afgcxa.pem4jan.rain.nc afgcxa.pem4feb.rain.nc afgcxa.pem4mar.rain.nc afgcxa.pem4apr.rain.nc I want to rename them to afgcxa.pem4-01.jan.rain.nc afgcxa.pem4-02.feb.rain.nc afgcxa.pem4-03.mar.rain.nc ... (5 Replies)
Discussion started by: Muhammad Rahiz
5 Replies

5. UNIX for Dummies Questions & Answers

Problems in shell script if sed is used

Hi All, Below is the script which i have written in cygwin: #!/usr/bin/sh fname=$1 cat $fname | sed 's/ //g' > fname1 for i in `cat $fname1` do echo $i > file1 #param1 is script name param1=`awk -F , '{print $1}' file1` param1="$param1.sql" #param2 is BL param2=`awk -F , '{print... (5 Replies)
Discussion started by: janardhanamk
5 Replies

6. Shell Programming and Scripting

using sed in shell script

Hi, i want to replace sub text which is in the middle of long text. let me be more clear with an example. Here is the actual text in the xml file <module-option name="principalDNSuffix">,cn=Users,dc=X,dc=Y</module-option> Now, in the above text, i want to replace all the content lying... (3 Replies)
Discussion started by: sunrexstar
3 Replies

7. Shell Programming and Scripting

SED shell script

Generate a ddl file, we have a flat file which contains many commands like REM, CREATE table, TRuncate etc This script should copy only create table statements to the ddl file. Create stmts can be in a single or multiple lines. ex:- INPUT FILE create table tbl1 (fld1,... (5 Replies)
Discussion started by: learninfo
5 Replies

8. Programming

Shell script using sed or awk

Hi, I want to read a file from the command line and remove all the spaces, tabs in it, replacing it with comma(,), and write it to a new file. can you help me out with this scenario. (1 Reply)
Discussion started by: sudhanshu12788
1 Replies

9. Homework & Coursework Questions

Asst: Shell Script to sed

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Generalize your sub2 script, producing a new script sub3 that will apply a substitution to any number of files... (16 Replies)
Discussion started by: raymondbn
16 Replies

10. Shell Programming and Scripting

Need help on shell script (sed)

Hi Guys, I have a xml file as below where I need to find the particular XML tag(<dpath>) and delete the content of it. <?xml version="1.0" encoding="UTF-8"?> <title>XML</title><head>Ram</head><ControlCenter><doStatus>1</doStatus></ControlCenter><exitlabel>Gzip... (7 Replies)
Discussion started by: Vinoth Kumar G
7 Replies
AFINITSAMPLEFORMAT(3)													     AFINITSAMPLEFORMAT(3)

NAME
afInitSampleFormat, afInitByteOrder, afInitChannels, afInitRate - initialize audio data format for a track in an audio file setup SYNOPSIS
#include <audiofile.h> void afInitSampleFormat(AFfilesetup setup, int track, int sampleFormat, int sampleWidth); void afInitByteOrder(AFfilesetup setup, int track, int byteOrder); void afInitChannels(AFfilesetup setup, int track, int channels); void afInitRate(AFfilesetup setup, int track, double rate); PARAMETERS
setup is a valid file setup returned by afNewFileSetup(3). track specifies a track within the audio file setup. track is always AF_DEFAULT_TRACK for all currently supported file formats. sampleFormat is a symbolic constant specifying the sample format for the audio data in the track. sampleFormat must be one of AF_SAMPFMT_TWOSCOMP, AF_SAMPFMT_UNSIGNED, AF_SAMPFMT_FLOAT, or AF_SAMPFMT_DOUBLE. sampleWidth is a positive integer specifying the number of bits for each sample in the track. byteOrder is a symbolic constant specifying the byte order of the track. byteOrder must be one of AF_BYTEORDER_BIGENDIAN or AF_BYTEORDER_LITTLEENDIAN. channels is a positive integer specifying the number of channels in the track. rate is a positive double-precision floating-point number specifying the sample rate of the track. DESCRIPTION
afInitSampleFormat initializes the track to the specified sample format and sample width. afInitByteOrder initializes the track to the specified byte order. afInitChannels initializes the track to the specified number of channels. afInitRate initializes the track to the specified sample rate. ERRORS
afInitSampleFormat, afInitByteOrder, afInitChannels, and afInitRate can produce the following errors: AF_BAD_FILESETUP setup represents an invalid file setup. AF_BAD_TRACK track represents an invalid track identifier. afInitSampleFormat can also produce the following errors: AF_BAD_SAMPFMT sampleFormat does not represent a valid sample format. AF_BAD_WIDTH sampleWidth is not a valid sample width. afInitByteOrder can also produce the following error: AF_BAD_BYTEORDER byteOrder does not represent a valid byte order. afInitChannels can also produce the following error: AF_BAD_CHANNELS channels specifies an invalid number of channels. afInitRate can also produce the following error: AF_BAD_RATE rate specifies an invalid sample rate. SEE ALSO
afNewFileSetup(3), afInitFileFormat(3), afInitCompression(3), afOpenFile(3) AUTHOR
Michael Pruett <michael@68k.org> Audio File Library 0.3.6 03/06/2013 AFINITSAMPLEFORMAT(3)
All times are GMT -4. The time now is 07:20 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy