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 DEBIAN
midi2mg
MIDI2MG(1) General Commands Manual MIDI2MG(1)NAME
midi2mg - convert a midi file into midge(1) text format.
SYNOPSIS
midi2mg [ options ] midi_file
DESCRIPTION
midi2mg reads a midi file and writes its contents to a file in midge(1) text format. It prints a message to stdout for any midi events it
can't handle.
OPTIONS -h or --help
Display help text.
-v or --verbose
Print verbose messages to stdout.
-q or --quiet
Quiet. No stdout.
-o file or --outfile file
Write output to file. Otherwise converts file.mid to file.mg Outputs to stdout if file is `-'. When outputting to stdout quiet mode
is automatically set unless verbose mode is set earlier on the command line.
-w or --ignore-wrong-track
Ignore MIDI events on the wrong channel instead of exiting.
-n i[,j...] or --include-tracks i[,j...]
Only convert the tracks in the comma separated list, with track numbers starting from 1.
-N i[,j...] or --exclude-tracks i[,j...]
Convert all tracks except those specified in the comma separated list.
-t n or --tuplet-factor n
An additional factor for files with odd note lengths, to prevent them being translated as decimals (n should be a prime number
greater than 3).
-F or --no-factorise
Do not factorise time values (may help to decipher unusual tuplet values).
BUGS
Does not correctly handle some text events.
Does not handle SMTPE style tempo events.
Does not handle changes of tempo/time_sig/key if these are on a separate tempo track.
SEE ALSO midge(1)AUTHOR
David Riley <dave@dmriley.demon.co.uk>
17 July 2006 MIDI2MG(1)