10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
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
2. Shell Programming and Scripting
Hello everyone,
I want to remove only prefix ME_ from all the values that are present in the FILEA. Below code I'm using for this.
sed 's/ME\_//g' FILEA > FILEB
Using the above code, all ME_ values are getting removed from the file. But the problem here is I want to remove only Prefix ME_... (4 Replies)
Discussion started by: ed_9
4 Replies
3. Shell Programming and Scripting
75
103
131
133
138
183
197
221
232
234
248
256
286
342
368
389
463
499
524
538 (5 Replies)
Discussion started by: chrisjorg
5 Replies
4. UNIX for Dummies Questions & Answers
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)
Discussion started by: chicchan
6 Replies
5. Shell Programming and Scripting
I have a shell script and it works pretty well to pull out the query_string contents of a single instance of router=
But if I have multiple router= strings, it only pulls out the last one.
Is there a way to pull out every router= and if there is a multple string, to egrep them together... (1 Reply)
Discussion started by: numele
1 Replies
6. UNIX for Dummies Questions & Answers
I have a file:
chromosome1:436728
chromosome2:32892
.....
chromosome22:23781
I just want to get the number, not the prefix "chromosomeX", so I want to remove all the prefix ahead of the numbers. How can I do that?? Thanks!!! (PS: give me some very simple command so that I can understand... (4 Replies)
Discussion started by: kaixinsjtu
4 Replies
7. Shell Programming and Scripting
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)
Discussion started by: tostay2003
1 Replies
8. Shell Programming and Scripting
Hi all,
I have a requirement where in i have to create a temporary file by prefixing a string of special characters to each row of a input file.
the input file is '|' delimited.
here is the content of input file
aaa|1234|axad|123
bbb|qwqw|qw|1334
the output should be
... (5 Replies)
Discussion started by: nvuradi
5 Replies
9. Shell Programming and Scripting
Hi
Input File:
export NAME='AA.BB.CC'
export FILE=1.2.3
AA.BB.CC
export MAIL= '1.3.3'
export char='XX.YY.ZZ'
Out File
export NAME='AA/BB/CC'
export FILE=1.2.3
AA.BB.CC
export MAIL= '1.3.3'
export char='XX/YY/ZZ'
Only the Lines which have export and have alphabets after =... (9 Replies)
Discussion started by: pbsrinivas
9 Replies
10. Shell Programming and Scripting
Hi folks,
I have the following parameter setting:
export ADMIN_HOST_NAME=http://hostname.com
I want to define a new parameter,ADMIN_HOST_NAME_NEW,which based on $ADMIN_HOST_NAME but I need to remove the prefix "http://".
The requested result for $ADMIN_HOST_NAME_NEW is hostname.com
How... (2 Replies)
Discussion started by: nir_s
2 Replies