10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
My code below will print only the email address from all lines. I want to convert it with sed or awk.. also what if i just want to find only filenames.
cat LIS_EMAIL | perl -wne'while(/+@+\w+/g){print "$&\n"}'
Hoping to extract the filename such us .exe, .bin. From file that has scrambled... (8 Replies)
Discussion started by: invinzin21
8 Replies
2. Shell Programming and Scripting
All,
I have thousands of lines in a file with following format
DATA=_ONE_XXX_YYY_CCC_HHHG_
DATA1=_GGG_JJJJ_HHH_UUU_JJJJ_HHHH_LLL_
DATA3=_MMM_GG_NN_QQQQ_FFF_III_
I want to replace _ with . by ignoring the first (=_) and last (_)
So that out put should looks like... (4 Replies)
Discussion started by: baluchen
4 Replies
3. Shell Programming and Scripting
Hi,
In a file, I have several time
<IP>232.0.1.164</IP>
...
<IP>232.0.1.135</IP>
I need to replace all the random IP addresses , by 239.0.0.1 and 239.0.0.2 , alternatively.
I try this
grep "<IP>" tsp.xml | awk '{if(NR % 2)print $0}' | cut -d"<" -f2 | cut -d">" -f2 ... (3 Replies)
Discussion started by: FredMo
3 Replies
4. Shell Programming and Scripting
I have file file_1.txt which contains:
file_1.txt
<tr> 1 MAIL # 1 TO src_1 </tr>
<tr><td class="hcol">col_id</td> <td class="hcol">test_dt</td> <td class="hcol">user_type</td> <td class="hcol">ct</td></tr>
<tr><td class="bcol">1</td> <td class="bcol">2012-09-20</td> <td class="bcol">a</td>... (2 Replies)
Discussion started by: sol_nov
2 Replies
5. Shell Programming and Scripting
I have an input like following.
*DEFINE_CURVE_TITLE
Force for tool binder
$# lcid sidr sfa sfo offa offo dattyp
3 0 1 .000000 125.00000 0.000 0.000 0
$# a1 ... (5 Replies)
Discussion started by: hamnsan
5 Replies
6. Shell Programming and Scripting
Hi ,
My file have data like
4:ALMOST NEVER PR 1925836
5:NEVER PR W DDA 5857610
6:NEVER PR WO DDA 26770205
but i want to replace the spaces before last numric digits out put should be like this
4:ALMOST NEVER PR=1925836
5:NEVER PR W DDA=5857610
6:NEVER PR WO... (7 Replies)
Discussion started by: max_hammer
7 Replies
7. UNIX for Dummies Questions & Answers
Hi
I have a problem when i use awk or sed to replace characters in file.
For example when I want to replace line like this :
00000O120100512 1.70 1.59 0.00 +7.280
I want to get a new line :
0000000O120100512 1.70 1.59 13.56 +7.280
In ksh :
awk... (1 Reply)
Discussion started by: Artur
1 Replies
8. Shell Programming and Scripting
Hello i need some help with the usage of sed.
Situation : 2 textfiles, file.in , file.out
In the first textfile which is called file.in are the words for the substitution.
Every word is in a new-line like :
Firstsub
Secondsub
Thridsub
...
In the second textflie wich is called file.out is... (5 Replies)
Discussion started by: Kingbruce
5 Replies
9. Shell Programming and Scripting
Sed help
echo "(200 rows affected)" | sed -e '/\(//p' | sed -e '/\)//p' | awk '{print $1}'
I want output as "200"
Please help me correct (2 Replies)
Discussion started by: pinnacle
2 Replies
10. Shell Programming and Scripting
There is a service that runs that we call multi-streaming that calls a shell script multiple times simultaneously. In this shell script is the following line:
tr '\r' '\n' < $POLLFILE.OUT | sed '/0000000000000016000A/d' > $POLLFILE
When I run this manually it produces the desired results, but... (6 Replies)
Discussion started by: philplasma
6 Replies