12-18-2008
Not very clear.
Could you paste a sample input record and expected output record for the same.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I just stuckup in doing some regular expressions on a file.
I have data which has multiple FHS and BTS segments like:
FHS|12121|LOCAL|2323
MSH|10101|POTAMAS|2323
PID|121221|THOMAS|DAVID|23432
OBX|2342|H1211|3232
BTS|0000|MERSTO|LIABLE
FHS|12121|LOCAL|2323
MSH|10101|POTAMAS|2323... (3 Replies)
Discussion started by: naren_0101bits
3 Replies
2. UNIX for Advanced & Expert Users
Hi - I tried to remove ^M in a delimited file using "tr -d "\r" and "sed 's/^M//g'", but it does not work quite well. While the ^M is removed, the format of the record is still cut in half, like
a,b, c
c,d,e
The delimited file is generated using sh script by outputing a SQL query result to... (7 Replies)
Discussion started by: sirahc
7 Replies
3. Shell Programming and Scripting
Hi Experts
I am very new to perl and need to make a script using perl.
I would like to remove blanks in a text tab delimited file in in a specfic column range ( colum 21 to column 43) sample input and output shown below :
Input:
117 102 650 652 654 656
117 93 95... (3 Replies)
Discussion started by: Faisal Riaz
3 Replies
4. Shell Programming and Scripting
Hi Guys,
Happy New Year to you all!
I have a requirement to read an embedded new-line using KSH's read builtin.
Here is what I am trying to do:
run_sql "select guestid, address, email from guest" | while read id addr email
do
## Biz logic goes here
done
I can take care of any... (6 Replies)
Discussion started by: a_programmer
6 Replies
5. Shell Programming and Scripting
Hi Gurus,
Apologies as I feel like this must be answered already on here somewhere but I just can't find it. I find many people looking to remove all \n and \r (CR and LF) or one or the other but the only times I've found someone trying to remove them only when both are together they've found... (7 Replies)
Discussion started by: Leedor
7 Replies
6. Shell Programming and Scripting
Greetings all,
i have csv file with pipe separated columns
SSN|NAME|ADDRESS|FILLER
123|abc|myaddress|xxx
234|BBB|my
add
ress
broken up|yyy
In the example above, the second record is broken into multiple lines. I need to keep going until I find a "|" since this issue is with the... (14 Replies)
Discussion started by: stayalive
14 Replies
7. UNIX for Dummies Questions & Answers
I'm trying to remove all of the empty lines at the end of a Tab delimited file. They have no data just tabs.
I've tried may things, here are a couple:
sed /^\t.\t/d File1 > File2
sed /^\t{44}/d File1 > File2
What am I missing? (9 Replies)
Discussion started by: SirHenry1
9 Replies
8. Shell Programming and Scripting
Hello,
I have a very large dictionary file which is in text format and which contains a large number of sub-sections. Each sub-section starts with the following header :
#DATA
#VALID 1
and ends with a footer as shown below
#END
The data between the Header and the Footer consists of... (6 Replies)
Discussion started by: gimley
6 Replies
9. Shell Programming and Scripting
Hi below is my file.
cat input.dat
101,abhilash,1000
102,prave
en,2000
103,partha,4
000
10
4,naresh,5000
(its just a example file)
and my output should be:
101,abhilash,1000
102,praveen,2000
103,partha,4000
104,naresh,5000
below is my code
cat input.dat |tr -d '\n' >... (6 Replies)
Discussion started by: abhilash_nakka
6 Replies
10. Shell Programming and Scripting
Hi guys,Got a bit of a bind I'm in. I'm looking to remove duplicates from a pipe delimited file, but do so based on 2 columns. Sounds easy enough, but here's the kicker...
Column #1 is a simple ID, which is used to identify the duplicate.
Once dups are identified, I need to only keep the one... (2 Replies)
Discussion started by: kevinprood
2 Replies
LEARN ABOUT DEBIAN
record
record(1) General Commands Manual record(1)
NAME
record - records *.wav files
SYNOPSIS
record [ options ]
DESCRIPTION
record records *.wav files in CD quality (i.e. 44100 Hz, 16bit, stereo). It has a input level meter, which might be useful for sound trou-
ble shooting (check if the mixer settings ok for recording from the TV card etc.)
OPTIONS
-h display help text
-o file
basename for the output file(s), a number and the .wav extension are added by record. Default is "record".
-i dev mixer control. This should be the one where you can adjust the record level for your audio source. Default is "line". "mic" and
"igain" are good candidates too. Best way to figure is to start your favorite mixer tool and check out which one works ...
-m dev set mixer device. Default is "/dev/mixer".
-d dev set audio device. Default is "/dev/dsp".
-r rate
set sample rate. Default is 44100.
-p sec peak seconds (number of seconds which should be scanned for the volume maximum). This affects both peak level display and level
triggered recording (see below). Default is 1.5 seconds.
record can also be used non-interactive:
-c enable console (non-interactive) mode.
-v be verbose (console mode only).
-t mm:ss
Limit the record time (console mode only). By default record records until stopped by a signal (by typing ^C for example).
-s size
Limit the file size (console mode only). record will continue with a new file once the limit is reached.
-n num Limit the file count (console mode only). record will stop recording after num files.
-l Enable level triggered recording (console mode only) with the default trigger level (1000).
-L level
Enable level triggered recording with the specified trigger level.
If level triggered recording is active, record will start and stop recording depending on the signal strength. Recording will be started
if the signal strength is above the trigger level (1000/32768 => around 3%). Recording will be stopped if the signal is below the trigger
level for some time (1.5 seconds by default, the -p switch changes this).
AUTHOR
Gerd Knorr <kraxel@bytesex.org>
(c) Gerd Knorr record(1)