Sponsored Content
Top Forums Shell Programming and Scripting remove first few characters from each line Post 302636133 by ratheeshjulk on Monday 7th of May 2012 05:22:13 AM
Old 05-07-2012
remove first few characters from each line

Hi,

I have a file with lines like below.
I need to remove first few characters from each line until a date format is found.

Code:
05/06/12 20:47:02 GUMGUY@98.192.174.74{42B42A72AC955F5926621273E3A15059.tomcat2}TP-Processor15 LogExchUsage: ERROR:
05/06/12 20:47:02 GUMGUY@98.192.174.74{42B42A72AC955F5926621273E3A15059.tomcat2}TP-Processor15 LogExchUsage: ERROR:
51129.77605/02/12 11:44:32 NEARRIDGIDAGHLAR@98.251.109.147{E889D36D2B2082668147CB1E0A47A91B.tomcat1}TP-Processor26 LogExchUsage:
18797.45204/13/12 06:55:40 BYE67BYE@96.254.176.116{3FC897AF82897CF3683FE06D6A21997E.tomcat8}TP-Processor18 LogExchUsage: ERROR:
Request for getNextPage.................04/26/12 06:44:20 BAOBEIBUNNY@96.242.252.247{2E29DD4B985715A69EA18021E6EB088B.tomcat4}TP-Processor29 LogExchUsage:

I need to remove first few characters from each line until a date format is found.
out put should be like this.

Code:
05/06/12 20:47:02 GUMGUY@98.192.174.74{42B42A72AC955F5926621273E3A15059.tomcat2}TP-Processor15 LogExchUsage: ERROR: 
05/06/12 20:47:02 GUMGUY@98.192.174.74{42B42A72AC955F5926621273E3A15059.tomcat2}TP-Processor15 LogExchUsage: ERROR:
05/02/12 11:44:32 NEARRIDGIDAGHLAR@98.251.109.147{E889D36D2B2082668147CB1E0A47A91B.tomcat1}TP-Processor26 LogExchUsage:
04/13/12 06:55:40 BYE67BYE@96.254.176.116{3FC897AF82897CF3683FE06D6A21997E.tomcat8}TP-Processor18 LogExchUsage: ERROR:
04/26/12 06:44:20 BAOBEIBUNNY@96.242.252.247{2E29DD4B985715A69EA18021E6EB088B.tomcat4}TP-Processor29 LogExchUsage:

Any clue...
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

how to remove line greater then 3000 characters.

I am using awk and it stops when it encounter line greater then 3000 character. Is there any command which will help me remove line greater then 3000 characters. (10 Replies)
Discussion started by: naren_14
10 Replies

2. Shell Programming and Scripting

sed remove last 10 characters of a line start from 3rd line

hello experts, I need a sed command that remove last 10 characters of a line start from 3rd line. any suggestions? Thanks you (7 Replies)
Discussion started by: minifish
7 Replies

3. UNIX for Dummies Questions & Answers

remove characters from line

Hello, I have multiple lines in a file, each of which will have data that looks like this: xxxxxyyyyzzzz4abcdXYZXYZXYZ pqrstPQRST2cdPQRSTPQRST lmnopqr6abcdefgRST.3abc I want to be able to remove the number 4 + the following 4 characters (abcd) in the first line. For the second line,... (1 Reply)
Discussion started by: Gussifinknottle
1 Replies

4. Shell Programming and Scripting

How to remove special characters from each line?

Hello, Is there a simpler way to remove special characters (color codes) from each lines in a log file? I use sed like in the example below but I think there should be a more simple way to achieve the same result: $ cat -vet file1 ^, , , , Maybe to convert the file somehow? ... (5 Replies)
Discussion started by: majormark
5 Replies

5. UNIX for Advanced & Expert Users

Remove new line characters if found between 1 to 10 columns

Hi, I have a file with ';' delimeter which has some new line characters. How can I delete the new line characters if they are found between 1 to 10 fields. Thanks (3 Replies)
Discussion started by: rudoraj
3 Replies

6. UNIX Desktop Questions & Answers

Remove new line characters from a file

I tried using below command tr -cd "" < InputFile.xml > output.txt ============= This removes all the tabs/newline/extra spaces from a file it successfully removed all the extra spaces,tabs and new line characters but then the complete file become one record. I want to retain one new line... (1 Reply)
Discussion started by: saini
1 Replies

7. Shell Programming and Scripting

Remove characters from line

I have a the following line 22.152.25.36 - K##### "GET /DGGKE/GetMail.do;jwebsphere=FADFFFGSFGSFGSDGFSDFGSDFGSDF HTTP/1.1" 200 44948 Need a cut command which should give me the below output 22.152.25.36 - K##### "GET /DGGKE/GetMail.do HTTP/1.1" 200 44948 Note: The value of jwebsphere can... (6 Replies)
Discussion started by: suindar1982
6 Replies

8. Shell Programming and Scripting

I want to remove 1st and last two characters of each line of the file

I want to remove 1st and last two characters of each line of the file Ex: file1 zzfile1ee @xfile2:y qfile3>> @ file4yy and redirect to the file called new Basically file will have any charcter including space, spical character... Please help.... (7 Replies)
Discussion started by: shell1509
7 Replies

9. Shell Programming and Scripting

Ksh: Read line parse characters into variable and remove the line if the date is older than 50 days

I have a test file with the following format, It contains the username_date when the user was locked from the database. $ cat lockedusers.txt TEST1_21062016 TEST2_02122015 TEST3_01032016 TEST4_01042016 I'm writing a ksh script and faced with this difficult scenario for my... (11 Replies)
Discussion started by: humble_learner
11 Replies

10. Shell Programming and Scripting

Remove first 2 characters and last two characters of each line

here's what im trying to do. i have a file containing lines similar to this: data.txt: 1hsRmRsbHRiSFZNTTA1dlEyMWFkbU5wUW5CSlIyeDFTVU5SYjJOSFRuWmpia0ZuWXpKV2FHTnRU 1lKUnpWMldrZFZaMG95V25oYQpSelEyWTBka2QyRklhSHBrUjA1b1kwUkJkd3BOVXpWM1lVaG5k... (5 Replies)
Discussion started by: SkySmart
5 Replies
ISO_8859-5(7)						     Linux Programmer's Manual						     ISO_8859-5(7)

NAME
iso_8859-5 - ISO 8859-5 character set encoded in octal, decimal, and hexadecimal DESCRIPTION
The ISO 8859 standard includes several 8-bit extensions to the ASCII character set (also known as ISO 646-IRV). ISO 8859-5 encodes the Cyrillic characters used in many East European languages. ISO 8859 alphabets The full set of ISO 8859 alphabets includes: ISO 8859-1 West European languages (Latin-1) ISO 8859-2 Central and East European languages (Latin-2) ISO 8859-3 Southeast European and miscellaneous languages (Latin-3) ISO 8859-4 Scandinavian/Baltic languages (Latin-4) ISO 8859-5 Latin/Cyrillic ISO 8859-6 Latin/Arabic ISO 8859-7 Latin/Greek ISO 8859-8 Latin/Hebrew ISO 8859-9 Latin-1 modification for Turkish (Latin-5) ISO 8859-10 Lappish/Nordic/Eskimo languages (Latin-6) ISO 8859-11 Latin/Thai ISO 8859-13 Baltic Rim languages (Latin-7) ISO 8859-14 Celtic (Latin-8) ISO 8859-15 West European languages (Latin-9) ISO 8859-16 Romanian (Latin-10) ISO 8859-5 characters The following table displays the characters in ISO 8859-5 that are printable and unlisted in the ascii(7) manual page. Oct Dec Hex Char Description ------------------------------------------------------------------------ 240 160 A0 NO-BREAK SPACE 241 161 A1 CYRILLIC CAPITAL LETTER IO 242 162 A2 CYRILLIC CAPITAL LETTER DJE 243 163 A3 CYRILLIC CAPITAL LETTER GJE 244 164 A4 CYRILLIC CAPITAL LETTER UKRAINIAN IE 245 165 A5 CYRILLIC CAPITAL LETTER DZE 246 166 A6 CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I 247 167 A7 CYRILLIC CAPITAL LETTER YI 250 168 A8 CYRILLIC CAPITAL LETTER JE 251 169 A9 CYRILLIC CAPITAL LETTER LJE 252 170 AA CYRILLIC CAPITAL LETTER NJE 253 171 AB CYRILLIC CAPITAL LETTER TSHE 254 172 AC CYRILLIC CAPITAL LETTER KJE 255 173 AD SOFT HYPHEN 256 174 AE CYRILLIC CAPITAL LETTER SHORT U 257 175 AF CYRILLIC CAPITAL LETTER DZHE 260 176 B0 CYRILLIC CAPITAL LETTER A 261 177 B1 CYRILLIC CAPITAL LETTER BE 262 178 B2 CYRILLIC CAPITAL LETTER VE 263 179 B3 CYRILLIC CAPITAL LETTER GHE 264 180 B4 CYRILLIC CAPITAL LETTER DE 265 181 B5 CYRILLIC CAPITAL LETTER IE 266 182 B6 CYRILLIC CAPITAL LETTER ZHE 267 183 B7 CYRILLIC CAPITAL LETTER ZE 270 184 B8 CYRILLIC CAPITAL LETTER I 271 185 B9 CYRILLIC CAPITAL LETTER SHORT I 272 186 BA CYRILLIC CAPITAL LETTER KA 273 187 BB CYRILLIC CAPITAL LETTER EL 274 188 BC CYRILLIC CAPITAL LETTER EM 275 189 BD CYRILLIC CAPITAL LETTER EN 276 190 BE CYRILLIC CAPITAL LETTER O 277 191 BF CYRILLIC CAPITAL LETTER PE 300 192 C0 CYRILLIC CAPITAL LETTER ER 301 193 C1 CYRILLIC CAPITAL LETTER ES 302 194 C2 CYRILLIC CAPITAL LETTER TE 303 195 C3 CYRILLIC CAPITAL LETTER U 304 196 C4 CYRILLIC CAPITAL LETTER EF 305 197 C5 CYRILLIC CAPITAL LETTER HA 306 198 C6 CYRILLIC CAPITAL LETTER TSE 307 199 C7 CYRILLIC CAPITAL LETTER CHE 310 200 C8 CYRILLIC CAPITAL LETTER SHA 311 201 C9 CYRILLIC CAPITAL LETTER SHCHA 312 202 CA CYRILLIC CAPITAL LETTER HARD SIGN 313 203 CB CYRILLIC CAPITAL LETTER YERU 314 204 CC CYRILLIC CAPITAL LETTER SOFT SIGN 315 205 CD CYRILLIC CAPITAL LETTER E 316 206 CE CYRILLIC CAPITAL LETTER YU 317 207 CF CYRILLIC CAPITAL LETTER YA 320 208 D0 CYRILLIC SMALL LETTER A 321 209 D1 CYRILLIC SMALL LETTER BE 322 210 D2 CYRILLIC SMALL LETTER VE 323 211 D3 CYRILLIC SMALL LETTER GHE 324 212 D4 CYRILLIC SMALL LETTER DE 325 213 D5 CYRILLIC SMALL LETTER IE 326 214 D6 CYRILLIC SMALL LETTER ZHE 327 215 D7 CYRILLIC SMALL LETTER ZE 330 216 D8 CYRILLIC SMALL LETTER I 331 217 D9 CYRILLIC SMALL LETTER SHORT I 332 218 DA CYRILLIC SMALL LETTER KA 333 219 DB CYRILLIC SMALL LETTER EL 334 220 DC CYRILLIC SMALL LETTER EM 335 221 DD CYRILLIC SMALL LETTER EN 336 222 DE CYRILLIC SMALL LETTER O 337 223 DF CYRILLIC SMALL LETTER PE 340 224 E0 CYRILLIC SMALL LETTER ER 341 225 E1 CYRILLIC SMALL LETTER ES 342 226 E2 CYRILLIC SMALL LETTER TE 343 227 E3 CYRILLIC SMALL LETTER U 344 228 E4 CYRILLIC SMALL LETTER EF 345 229 E5 CYRILLIC SMALL LETTER HA 346 230 E6 CYRILLIC SMALL LETTER TSE 347 231 E7 CYRILLIC SMALL LETTER CHE 350 232 E8 CYRILLIC SMALL LETTER SHA 351 233 E9 CYRILLIC SMALL LETTER SHCHA 352 234 EA CYRILLIC SMALL LETTER HARD SIGN 353 235 EB CYRILLIC SMALL LETTER YERU 354 236 EC CYRILLIC SMALL LETTER SOFT SIGN 355 237 ED CYRILLIC SMALL LETTER E 356 238 EE CYRILLIC SMALL LETTER YU 357 239 EF CYRILLIC SMALL LETTER YA 360 240 F0 NUMERO SIGN 361 241 F1 CYRILLIC SMALL LETTER IO 362 242 F2 CYRILLIC SMALL LETTER DJE 363 243 F3 CYRILLIC SMALL LETTER GJE 364 244 F4 CYRILLIC SMALL LETTER UKRAINIAN IE 365 245 F5 CYRILLIC SMALL LETTER DZE 366 246 F6 CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I 367 247 F7 CYRILLIC SMALL LETTER YI 370 248 F8 CYRILLIC SMALL LETTER JE 371 249 F9 CYRILLIC SMALL LETTER LJE 372 250 FA CYRILLIC SMALL LETTER NJE 373 251 FB CYRILLIC SMALL LETTER TSHE 374 252 FC CYRILLIC SMALL LETTER KJE 375 253 FD S SECTION SIGN 376 254 FE CYRILLIC SMALL LETTER SHORT U 377 255 FF CYRILLIC SMALL LETTER DZHE SEE ALSO
ascii(7), charsets(7), cp1251(7), koi8-r(7), koi8-u(7), utf-8(7) COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/. Linux 2016-07-17 ISO_8859-5(7)
All times are GMT -4. The time now is 09:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy