10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Dear All,
I would like to instantiate a "pattern file" substituting "variable name" by their content.
Saying, we have:
1/ a "pattern file" containing different "variable name", the first character of the "variable name" is "@":
$ cat TPTModl.txt
DEFINE... (12 Replies)
Discussion started by: dae
12 Replies
2. Shell Programming and Scripting
i need to substitute word on a specific line.
I was able to do it on command line like below but it is not working in vi.
command line like below:
sed -e '8s/table_name/schema.table_name/' file_name.
in vi table_name and schema are my positional parameters that i pass into the
script.
... (5 Replies)
Discussion started by: pimmit22043
5 Replies
3. Shell Programming and Scripting
I need to make ~96 configure files from a template config file which has hundreds of rows that looks like:
template.config:
#average insert size
avg_ins=1000
......
other information omitted
Those config files are named in sequence from S01.config, S02.config, ... etc
with different... (11 Replies)
Discussion started by: yifangt
11 Replies
4. Shell Programming and Scripting
hi
I would like to ask if someone knows a command or a script on how to rename a multiple file in the directory starting at the end of the filename or at the .extension( i would like to remove the last 11 character before the extension) for example
Below is the result of my command ls inside... (5 Replies)
Discussion started by: jao_madn
5 Replies
5. Shell Programming and Scripting
I'd like to do this using Perl command line (sorry no awk, sed, etc.)
replace the 3 middle lines in a file by one line:
aaa 123
bbb 234
ccc 34567
dd 4567
ee 567
to:
aaa 123
AAA
ee 567
I tried this but not working:
perl -pi -e "s/aaa\ 123\nbbb\ 234\nccc\ 34567/AAA/" file (2 Replies)
Discussion started by: tintin78899
2 Replies
6. Shell Programming and Scripting
Hi
I'm trying to substitute word "January" with word "March" in my script but in certain lines only.
I have couple words containing pattern that I want to substitute e.g.
- log.January.1.array
- log_January_1_array_1
- log.January.1.array
- log_January_1_array_11
Trying to do cmd below... (9 Replies)
Discussion started by: presul
9 Replies
7. Shell Programming and Scripting
I want to reformat the following:
ID1 ID001 0 0 2 1 GG TC GG CT GG AA AA AG
ID2 ID002 0 0 2 2 GG 00 AG CC GG GG TC CC
I want to replace only:... (1 Reply)
Discussion started by: genehunter
1 Replies
8. Shell Programming and Scripting
Hello experts,
I know line number of the word I want to replace. Can "sed" substitute word on a specific line?
As well, can sed substitute words inside a specific patten.
ex. <word>lalala</word> #replace anything between <word> and </word>
minifish (2 Replies)
Discussion started by: minifish
2 Replies
9. Shell Programming and Scripting
Greetings.
I am struggling with a shell script to make my life simpler, with a number of practical ways in which it could be used. I want to take a standard text file, and pull the 'n'th word from each line such as the first word from a text file.
I'm struggling to see how each line can be... (5 Replies)
Discussion started by: tricky
5 Replies
10. Shell Programming and Scripting
well i have this file here:
<XML>
<pregate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<system_c>HPREGATE</system_c>
<trans_c>HSPG</trans_c>
<trans_dt>20060105161333</trans_dt>
<user_id_m></user_id_m>
<func_c>C</func_c>
</pregate>
</XML>
i want to... (2 Replies)
Discussion started by: forevercalz
2 Replies