10-06-2008
post sample input and output record
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a directory with files and sub-directories (sub-directory depth might go upto 5). There will be one or more spaces (continuously or anywhere in the file name) which need to be replaced with HYPHENs. How can i replace all SPACE occurances with HYPHEN in file/dir names recursively. (2... (5 Replies)
Discussion started by: prvnrk
5 Replies
2. Shell Programming and Scripting
Hi,
Below is my output file: (The below line has multiple spaces bet charc and I want to replace spaces with "," only for the first line)
NYCCMS97KJ931 01-JUN-08 1214957
I want this to be:
... (5 Replies)
Discussion started by: smc3
5 Replies
3. Shell Programming and Scripting
i have a file like::
$ cat space
asd
fghj
itkg
now i want to replace the next line with . and thn this . with the 100 spaces.
cat space | tr '\n' '.', it woked for me, to replce the new line to .
Now i want to replace this . with 100 spaces.
Thanks in advance. (10 Replies)
Discussion started by: Prashant Jain
10 Replies
4. UNIX for Dummies Questions & Answers
I have a file where in some records are having the <Start> and <End> tag. There is data before the start tag , between the tages and after the End tag. I want to replace everything between the start & end tag with equivalent spaces.
Input File
afsdfaksddfs<start>12678<end>sgdfgdfsf... (6 Replies)
Discussion started by: varunrbs
6 Replies
5. Shell Programming and Scripting
Dear Friends,
I have a flat file from which I want to remove single "space". And, wherever two spaces are provided it should replace it by only one space.
E.g.
I have
N A T I O N A L E D U C A T I O N F O R O R G AN I S A T I ON S
I want
NATIONAL EDUCATION FOR ORGANISATIONS
Please... (5 Replies)
Discussion started by: anushree.a
5 Replies
6. UNIX for Dummies Questions & Answers
Hello
#I have a file with a list of sequences; the sequence name is the line starting with '>'.
$cat infile
>AluYa5 SINE1/7SL Homo sapiens
ggccgggcgcggtggctcacgcctgtaatcccagcactttgggaggccgaggcgggcggatcacgaggtc
aggagatcgagaccatcccggctaaaacggtgaaaccccgtctctactaaaaatacaaaaaattagccgg... (11 Replies)
Discussion started by: jdhahbi
11 Replies
7. Shell Programming and Scripting
Hi Guys
file:///C:/DOCUME%7E1/c104058/LOCALS%7E1/Temp/moz-screenshot.pngsed 's///g' /source/filename.txt > /destination/filename.txt
The above code deletes the characters which are not A-Z, a-z and 0-9, but I wanted to replace it with space without deleting them.
Any help is... (2 Replies)
Discussion started by: gowrishankar05
2 Replies
8. Shell Programming and Scripting
Hello All,
I have a comma separated file which needs to be loaded to the database. But, I need to trim the white spaces for a specific column before its loaded.
Below is the sample line from the input file:
690,690,0575,"01011940","01011940", , , , , ,36720,36722,V2020,V2999,... (6 Replies)
Discussion started by: Praveenkulkarni
6 Replies
9. Shell Programming and Scripting
cat rf|nawk '/Use SSL= 0/{n+=1}{if (n==3){sub("Use SSL= 0","Use SSL= 0x1",$0)};print }' > rf2Fails.
sed 's/Use SSL= 0/Use SSL= 0x1/g' rf > rf2Fails.
In addition, the goal is to ONLY replace the 2nd occurence of the... (15 Replies)
Discussion started by: rfransix
15 Replies
10. UNIX for Dummies Questions & Answers
I'm using sh on hp-ux. I've got a file that looks like this.
-5.65 175
-16.17 160
-13.57 270
-51.72 260
-8.30 360
-42.71 460
-.38 375
-.20 375
-4.15 170
-21.53 560
-18.84 360
I'd like to replace all the whitespace between the columns with one comma. I can't... (4 Replies)
Discussion started by: Scottie1954
4 Replies
LEARN ABOUT DEBIAN
na_record
NA_RECORD(1) BSD General Commands Manual NA_RECORD(1)
NAME
na_record -- record waveform from audio device
SYNOPSIS
na_record [-h] [-f sampling rate] [-audiodevice device] [-time seconds] [-o file] [-otype type] [-ostype sample type] [-F sample rate]
[-obo MSB | LSB | native] [-oswap] [-p audio device protocol]
DESCRIPTION
na_record records digital audio data from the system's audio input device and writes it to the specified file. It supports a variety of out-
put file formats and native audio devices.
The following option flags are recognized:
-h Prints a short summary of usage to standard output.
-f sampling rate
Sets the input sampling rate (in samples per second, i.e. Hz). Not all devices support all sampling rates, so it may be desire-
able to set this separately from the output sampling rate.
-audiodevice device
Sets the audio device to record from, if supported by the audio protocol chosen (e.g. /dev/dsp, /dev/audio)
-time seconds
Stops recording after the specified number of seconds.
-o file
Writes sound output to the specified file
-otype type
Specifies the file format to use for output. Supported types currently include nist, est, dsps, snd, riff, aiff, audlab, raw, and
ascii. The -h flag will show the most accurate list. The default type is nist.
-F sampling rate
Sets the output sampling rate (again, in samples per second, i.e. Hz). If this differs from the input sampling rate, resampling
will be done. Defaults to 16000Hz.
-obo byte order
Sets the output byte order. Supported values are MSB, LSB, and native. Many file formats have their own byte order, or are byte
order independent, so this isn't tremendously useful except for raw data. The default is the native byte order for the system
audio device.
-oswap
Swap bytes when saving to output.
-ostype sample type
Sets the sample type of the output. Suported values are short, mulaw, byte, or ascii. Again, this is usually implied by the file
format, so should only be used for raw data. The default is short (i.e. 16-bit PCM).
-p audio device protocol
Selects an audio device protocol (i.e. type of audio device) to use. This varies between different installations of Speech
Tools, but defaults to the most 'native' audio device, usually Open Sound System on Linux and *BSD and /dev/audio on Solaris.
ENVIRONMENT
NA_PLAY_PROTOCOL
Audio protocol to use (as in the -p flag)
NA_PLAY_HOST
Host to record audio from when using a network audio protocol.
EXAMPLES
To record five seconds of audio from /dev/dsp1 (on Linux) to foo.wav in RIFF format at 32kHz:
$ na_record -time 5 -audiodevice /dev/dsp1 -o foo.wav -otype RIFF -f 32000
To record one second of audio to bar.wav in raw format in 8kHz mu-law:
$ na_record -time 1 -o bar.wav -otype raw -ostype mulaw -f 8000
BUGS
The -time argument only accepts integer values (though the usage message implies otherwise)
SEE ALSO
na_play(1)
Edinburgh Speech Tools April 4, 2001 Edinburgh Speech Tools