Sponsored Content
Full Discussion: Parsing via sed issue
Top Forums Shell Programming and Scripting Parsing via sed issue Post 303024009 by boncuk on Thursday 27th of September 2018 12:42:53 AM
Old 09-27-2018
Parsing via sed issue

sorry I messed up the last post with too many mistakes and corrections so I closed it and opening a new one which should be clear to everyone .my apologies to the admins.


I am using sun solaris and Linux , what I want is SED to print any string (or output it to a file preferably) that does not have either "01","03","05","07","10" or "11" on the 9th and 10th position .
e.g from the file below I only want these three lines


Code:
433483433339
167710001710
167730600000


Code:
$cat a.txt
 000000001000
 433483433339 <<< print this since 33 is at 9th and 10th pos
 121121211100 
 167710001710 <<< print this since 17 is at 9th and 10th pos
 167735250310
 167735260510
 167735280710
 167730600000 <<< print this since 00 is at 9th and 10th pos


hope I am clear this time.
thanks

Moderator's Comments:
Mod Comment edit by bakunin: we have no problems at all with messed-up posts, but we do take issue with missing CODE-tags. I'd appreciate it if i don't have to edit them in for you in the future because you use them yourself.

Last edited by bakunin; 09-27-2018 at 02:22 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

awk sed parsing

hi , i would like to parse some file with the fallowing data : data data data "unwanted data" data data "unwanted data" data data data data #unwanted data. what i want it to have any coments between "" and after # to be erased using awk or/and sed. has anyone an idea? thanks. (3 Replies)
Discussion started by: Darsh
3 Replies

2. Shell Programming and Scripting

parsing logfiles (performance issue)

-------------------------------------------------------------------------------- Hi All, I am reading some logfiles and parsing data and printing to some textfile. Here is my code OLDIFS=$IFS IFS=' ' # just a newline, in single quotes while read data do if then #Parsing the... (4 Replies)
Discussion started by: subin_bala
4 Replies

3. Shell Programming and Scripting

parsing issue with edi file

Hello, We have edi files we need to do some extra parsing on. There is a line that shows up that looks like this: GE|8,845|000000000 We need to parse the file, find the line ( that begins with GE "^GE" ), and remove the comma(s). What is the easiest way to do that ? I know I can grab... (5 Replies)
Discussion started by: fwellers
5 Replies

4. UNIX for Dummies Questions & Answers

Issue with parsing config variables

I am using MKS tool kit on windows server. One config variable is defined in windows environment and I am trying to use that variable. # Below RootDir is defined in windows RootDir="\\f01\var" # in unix script details="$RootDir/src|$RootDir/tgt" src=`echo $details|awk -F '|' '{print... (1 Reply)
Discussion started by: madhukalyan
1 Replies

5. Shell Programming and Scripting

Parsing issue

Scripting geeks please advice how this script should parse the input parameter to File Name convention to search the strings. Enclosed is the basic view of the search architecture. ##******************************************************************************************************* ## ... (2 Replies)
Discussion started by: raghunsi
2 Replies

6. Shell Programming and Scripting

Parsing cron with sed

Hello I want to convert my cron list into a csv Can you please help me with sed ? eg: Convert #06,21,36,51 * * 1,2 * (. ~/.profile ; timex /some/path/script -30 -15) >> /some/path/logfile2 2>&1 * * * * * (. ~/.profile ; timex /some/path/script2) > /some/path/logfile2 To:... (1 Reply)
Discussion started by: drbiloukos
1 Replies

7. Shell Programming and Scripting

sed (parsing value)

All, Can somebody provide me with some sed expertise on how to parse the following line. 27-MAR-2011 10:28:01 * (CONNECT_DATA=(SID=dmart)(CID=(PROGRAM=sqlplus)(HOST=mtasnprod1)(USER=mtasnord))) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.197.7.47)(PORT=54881)) * establish * dmart * 0 I would like... (3 Replies)
Discussion started by: BeefStu
3 Replies

8. Shell Programming and Scripting

Parsing issue while reading excel having 3000 record

Hi Need urgent help (2 Replies)
Discussion started by: premp26
2 Replies

9. Shell Programming and Scripting

Issue with awk script parsing log file

Hello All, I am trying to parse a log file and i got this code from one of the good forum colleagues, However i realised later there is a problem with this awk script, being naive to awk world wanted to see if you guys can help me out. AWK script: awk '$1 ~ "^WRITER_" {p=1;next}... (18 Replies)
Discussion started by: Ariean
18 Replies

10. Shell Programming and Scripting

Issue in awk parsing under while loop

Hi I am trying to parse a grep output using awk. It works fine individually and not working under the loop with variable name assigned. cat > file.txt dict=/dictr/abcd/d1/wq:/dictr/abcd/d2/wq:/dictr/abcd/d3/wq: sample tried code Nos=`grep -w "dict" file.txt | awk -F"=" '{print... (10 Replies)
Discussion started by: ananan
10 Replies
rumakeindex(1)							       teTeX							    rumakeindex(1)

NAME
rumakeindex - process a LaTeX index using Russian Cyrillic characters SYNOPSIS
rumakeindex basename DESCRIPTION
rumakeindex is used to run makeindex(1) on idx files that use Russian characters. It is part of the T2 package. rumakeindex runs sed(1) on the idx file to convert Cyrillic character commands to 8-bit ASCII characters; pipes the results through makein- dex(1); and then through tr(1) to do some final conversions. The results are placed in a KOI8-R encoded ind file. FILES
basename.idx LaTeX index entry file basename.ilg LaTeX index log file basename.ind LaTeX processed index file BUGS
None known, but report any bugs found to the authors. COPYRIGHT
The T2 package is Copyright 1997-1999 Werner Lemberg, Vladimir Volovich and any individual authors listed elsewhere in package files. It may be distributed under the conditions of the LaTeX Project Public License, either version 1.1 of this license or (at your option) any later version. SEE ALSO
makeindex(1), sed(1), tr(1), <ftp://ftp.vsu.ru/pub/tex/T2/README>. AUTHOR
Werner Lemberg <wl@gnu.org>, Vladimir Volovich <TeX@vvv.vsu.ru>. This manual page was written by C.M. Connelly <c@eskimo.com>, for the Debian GNU/Linux system. It may be used by other distributions with- out contacting the author. Any mistakes or omissions in the manual page are my fault; inquiries about or corrections to this manual page should be directed to me (and not to the primary author). teTeX September 2000 rumakeindex(1)
All times are GMT -4. The time now is 08:59 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy