Delete a word


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Delete a word
# 1  
Old 03-18-2009
Delete a word

i have created the following input script

Code:
CREATE OR REPLACE VIEW MMSSENDAVGUPLOADTIME_GN
AS
sp_strip_mean_value_type.get_val(MMSSENDAVGUPLOADTIME) MMSSENDAVGUPLOADTIME_val
sp_strip_mean_value_type.get_val(MMSSENDAVGUPLOADTIME) MMSSENDAVGUPLOADTIME_counter
select IMSI_ID,MCC_ID,MNC_ID,TIME_ID,COUNTER,ERRORCOUNT,
PDPCREATEATTEMPT,PDPCREATEFAILNETWORK,PDPCREATESUCCESS,
USERAGENT,HTTPGETATTEMPT,HTTPGETAVGTHROUGHPUT,
HTTPGETBYTES,HTTPGETSUCCESS,HTTPPOSTATTEMPT,
HTTPPOSTAVGTHROUGHPUT,HTTPPOSTBYTES,HTTPPOSTSUCCESS,
WAPGETATTEMPT,WAPGETAVGTHROUGHPUT,WAPGETBYTES,
WAPGETSUCCESS,WAPPOSTATTEMPT,WAPPOSTAVGTHROUGHPUT,
WAPPOSTBYTES,WAPPOSTSUCCESS,MMSRETRIEVEATTEMPT,
MMSRETRIEVEAVGDOWNLOADTIME,MMSRETRIEVEAVGTTFB,
MMSRETRIEVEAVGTHROUGHPUT,MMSRETRIEVEBYTES,
MMSRETRIEVESUCCESS,MMSSENDATTEMPT,MMSSENDAVGTTFB,
MMSSENDAVGTHROUGHPUT,MMSSENDAVGUPLOADTIME,MMSSENDBYTES,
MMSSENDSUCCESS,URL1ACCESSATTEMPT,URL1ACCESSSUCCESS,
URL1AVGDOWNLOADRATE,URL1AVGDOWNLOADTIME,URL1AVGTTFB,
URL2ACCESSATTEMPT,URL2ACCESSSUCCESS,URL2AVGDOWNLOADRATE,
URL2AVGDOWNLOADTIME,URL2AVGTTFB,URL3ACCESSATTEMPT,
URL3ACCESSSUCCESS,URL3AVGDOWNLOADRATE,
URL3AVGDOWNLOADTIME,URL3AVGTTFB,URL4ACCESSATTEMPT,
URL4ACCESSSUCCESS,URL4AVGDOWNLOADRATE,
URL4AVGDOWNLOADTIME,URL4AVGTTFB,URL5ACCESSATTEMPT,
URL5ACCESSSUCCESS,URL5AVGDOWNLOADRATE,URL5AVGDOWNLOADTIME,
URL5AVGTTFB,URL6ACCESSATTEMPT,URL6ACCESSSUCCESS,
URL6AVGDOWNLOADRATE,URL6AVGDOWNLOADTIME,URL6AVGTTFB,
URL7ACCESSATTEMPT,URL7ACCESSSUCCESS,URL7AVGDOWNLOADRATE,
URL7AVGDOWNLOADTIME,URL7AVGTTFB,URL8ACCESSATTEMPT,
URL8ACCESSSUCCESS,URL8AVGDOWNLOADRATE,URL8AVGDOWNLOADTIME,
URL8AVGTTFB,PDPCREATEFAIL,PDPCREATEFAILUSER,PDPCREATETIMEOUT,A
VGCLIENTSETUPTIME,AVGDOWNLOADTIME,AVGENDTOENDTIME,
AVGSERVERSETUPTIME,AVGTTFB,AVGUPLOADTIME,GETATTEMPT,
GETAVGTHROUGHPUT,GETSUCCESS,POSTATTEMPT,
POSTAVGTHROUGHPUT,POSTSUCCESS,HTTPGETTIMEOUT,
HTTPPOSTTIMEOUT,WAPGETABORT,WAPPOSTABORT,
MMSRETRIEVEAVGENDTOENDTIME,MMSSENDAVGENDTOENDTIME,
URL1AVGENDTOENDTIME,URL2AVGENDTOENDTIME,
URL3AVGENDTOENDTIME,URL4AVGENDTOENDTIME,
URL5AVGENDTOENDTIME,URL6AVGENDTOENDTIME,
URL7AVGENDTOENDTIME,URL8AVGENDTOENDTIME,PDPUPDATEATTEMPT,
PDPUPDATEFAIL,PDPUPDATEFAILNETWORK,PDPUPDATEFAILUSER,
PDPUPDATESUCCESS,PDPUPDATETIMEOUT,PDPDELETEATTEMPT,
PDPDELETEFAIL,PDPDELETEFAILNETWORK,PDPDELETEFAILUSER,
PDPDELETESUCCESS,PDPDELETETIMEOUT from gn_imsi_15_user@dblink where time_id=(select max(time_id) from gn_imsi_15_user@dblink) and imsi_id in (select imsi_id from gn_imsi_15_user);

Basically i now want to delete MMSSENDAVGUPLOADTIME when it occurs in the select statement

PS sorry for the messy post
# 2  
Old 03-18-2009
Code:
sed 's/MMSSENDAVGUPLOADTIME,//' file

 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Delete word from the file

My file has contents like below. It is named as output_file.txt /usr/sas/sas_config/Lev1/SASApp/StoredProcessServer/Logs/SASApp_STPServer_2015-08-27_tmptcmsaslva2_19142.log /usr/sas/sas_config/Lev1/SASApp/StoredProcessServer/Logs/SASApp_STPServer_2015-08-27_tmptcmsaslva2_19142.log... (12 Replies)
Discussion started by: Ram Kumar_BE
12 Replies

2. Shell Programming and Scripting

Delete Word between two Char.

HI Guys, I have Input:- A nput A.txt 000100/port_xcu_dev_6/port_0_dev_7 000100/port_xcu_dev_6/port_1_dev_10 000100/port_xcu_dev_2/port_2_dev_8 000100/port_xcu_dev_3/port_3_dev_11 000100/port_xcuv_9/port_4_dev_9 ... (3 Replies)
Discussion started by: pareshkp
3 Replies

3. Shell Programming and Scripting

Search the word to be deleted and delete lines above this word starting from P1 to P3

Hi, I have to search a word in a text file and then I have to delete lines above from the word searched . For eg suppose the file is like this: Records P1 10,23423432 ,77:1 ,234:2 P2 10,9089004 ,77:1 ,234:2 ,87:123 ,9898:2 P3 456456 P1 :123,456456546 P2 abc:324234 (2 Replies)
Discussion started by: vsachan
2 Replies

4. Shell Programming and Scripting

How to delete the last word in a file?

Hi All, I have a file with the data as below. In this i want to delete the last word. Could you pls help me. $INSTALL_HOME/lib/fm_voucher_pol.so $INSTALL_HOME/source/sys/fm_apn_pol/fm_apn_pol_device_set_state.c In the above two lines i want to delete fm_voucher_pol.so and... (5 Replies)
Discussion started by: girish.raos
5 Replies

5. Shell Programming and Scripting

Delete everything after/before a word in a file

I'm looking for a command that will read a file listing information and delete everything after a certain word is found. I also may need to search the file and delete everything before a certain word. The file would contains fields of information like below repeating for the entire file; Name... (5 Replies)
Discussion started by: daveisme
5 Replies

6. Shell Programming and Scripting

Delete character from a word

Friends, I'm looking for a command that delete the first tho caractere in a word. Here is an exp : I want to replace "20091001" by "091001" or "replace" by "place" Thx, (13 Replies)
Discussion started by: newpromo
13 Replies

7. UNIX for Dummies Questions & Answers

How to delete all character before certain word

Hi, For example, i have a string "123 456 789 abc 111 222 333" and I would like to delete all the characters before abc so that it becomes "abc 111 222 333" how can i do that in unix? using sed? note: I actually don't know how many words/charachters before "abc", so the "cut"... (9 Replies)
Discussion started by: phandy
9 Replies

8. Shell Programming and Scripting

delete line containin specified word

write a shell script that deletes all lines containing a specified word in one or more files supplied as arguments to it.help is appreciated .thank you. (2 Replies)
Discussion started by: shawz
2 Replies

9. Shell Programming and Scripting

How to delete a word from a file?

Hi All, I want to delete a word from file. How to do that. I have file that contains the following Information. EntityName:alba00r1.mis.amat.com OverallStatus:Minor IfName:Gi1/0 EntityName:alba00r1.mis.amat.com ] OverallStatus:Normal IfName:Se0/0/0... (4 Replies)
Discussion started by: ntgobinath
4 Replies

10. UNIX for Dummies Questions & Answers

how to delete spaces around a word

suppose a line has one word ex: unix how to delete space around that word? (8 Replies)
Discussion started by: sachin.gangadha
8 Replies
Login or Register to Ask a Question