Hi,
I have a variable, which contains comma separated values. Something like.
StringA="abc,def,ghi,jkl"
I want to apply prefix and suffix to each value in the string without using any loops.
Say if Prefix is Pre_ and Suffix is _Suf then I need to get
... (1 Reply)
Hi, how do I match a particular element in a list and replace it with blank?
awk 'sub///' $FILE
list="AL, AK, AZ, AR, CA, CO, CT, DE, FL, GA,
HI, ID, IL, IN, IA, KS, KY, LA, ME, MD,
MA, MI, MN, MS, MO, MT, NE, NV, NH, NJ,
NM, NY, NC, ND, OH, OK, OR, PA, RI, SC,
SD, TN, TX, UT, VT, VA, WA,... (2 Replies)
I need some help with adding lines to file and substitute a pattern.
Ok I have a file:
#cat names.txt
name: John Doe
stationed: 1
name: Michael Sweets
stationed: 41
.
.
.
And would like to change it to:
name: John Doe
employed
permanently
stationed: 1-office (7 Replies)
Hi,
test.txt contains below values
1
2
3
4
5
Desired output:
'TT.1',
'TT.2',
'TT.3',
'TT.4',
'TT.5'
Last value should not contain the comma after the value. Below is the script which i have tried. I'm using Linux.
#!/bin/bash
for i in $test.txt (4 Replies)
Hello,
I am a newbie to linux and struggling to find a better way to append a column in a text file.
Here is the file i want to modify: It has 8 columns (and thousands of rows). I want to append the first column by adding "chr" infront of the numbers. Some rows have a string in the first... (4 Replies)
Hi, I'm new about shell scripting, and I need to do something like
abcd **1234** efgh
by
abcd '''1234''' efgh
I know that command sed helps about change one string by another, but I dont know how to keep whatever is inside **_** and replace * with '.
Thanks! (5 Replies)
I have a file that has the words I want to find in other files (but lets say I just want to find my words in a single file). Those words are IDs, so if my word is ZZZ4, outputs like aaZZZ4, ZZZ4bb, aaZZZ4bb, ZZ4, ZZZ, ZyZ4, ZZZ4.8 (or anything like that) WON'T BE USEFUL.
I need the whole word... (6 Replies)
Is there a simple way to find the longest common prefix of a space-separated list of strings, optionally by field?
For example, given input:
"aaa_b_cc aaa_b_cc_ddd aaa_b_cc aaa_b_cd"with no field separator, output:
aaa_b_cwith _ field separator, output:
aaa_bI have an awk solution which... (1 Reply)
i would like to format the 9 character with suffix as "0".
i tried below it doesn't work.
>a=12345
> echo $a | awk '{printf "%-09s\n",$1}'
>12345
required output is 123450000
can you guys help me out ? (7 Replies)
Hi,
I want to add prefix and suffix on line# 205 using SED or AWK and want to change on the same file without creating new file.
This command will be used in the bash script
Am using Bash shell
Regards
Nayaj (3 Replies)
Discussion started by: Nayaj
3 Replies
LEARN ABOUT NETBSD
midiplay
MIDIPLAY(1) BSD General Commands Manual MIDIPLAY(1)NAME
midiplay -- play MIDI and RMID files
SYNOPSIS
midiplay [-d devno] [-f file] [-l] [-m] [-p pgm] [-q] [-t tempo] [-v] [-x] [file ...]
DESCRIPTION
The midiplay command plays MIDI and RMID files using the sequencer device. If no file name is given it will play from standard input, other-
wise it will play the named files.
RMID files are Standard MIDI Files embedded in a RIFF container and can usually be found with the 'rmi' extension. They contain some addi-
tional information in other chunks which are not parsed by midiplay yet.
The program accepts the following options:
-d devno specifies the number of the MIDI device used for output (as listed by the -l flag). There is no way at present to have midiplay
map playback to more than one device. The default is device is given by environment variable MIDIUNIT.
-f file specifies the name of the sequencer device.
-l list the possible devices without playing anything.
-m show MIDI file meta events (copyright, lyrics, etc).
-p pgm force all channels to play with the single specified program (or instrument patch, range 1-128). Program change events in the
file will be suppressed. There is no way at present to have midiplay selectively map channels or instruments.
-q specifies that the MIDI file should not be played, just parsed.
-t tempo-adjust
specifies an adjustment (in percent) to the tempi recorded in the file. The default of 100 plays as specified in the file, 50
halves every tempo, and so on.
-v be verbose. If the flag is repeated the verbosity increases.
-x play a small sample sound instead of a file.
A file containing no tempo indication will be played as if it specified 150 beats per minute. You have been warned.
ENVIRONMENT
MIDIUNIT the default number of the MIDI device used for output. The default is 0.
FILES
/dev/music MIDI sequencer device
SEE ALSO midi(4)HISTORY
The midiplay command first appeared in NetBSD 1.4.
BUGS
It may take a long while before playing stops when midiplay is interrupted, as the data already buffered in the sequencer will contain timing
events.
BSD January 16, 2010 BSD