[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Idea: jobs(1) -i to print only :%ID:s
From: |
Steffen Nurpmeso |
Subject: |
Re: Idea: jobs(1) -i to print only :%ID:s |
Date: |
Thu, 09 Nov 2023 20:36:13 +0100 |
User-agent: |
s-nail v14.9.24-563-g944131280a |
alex xmb sw ratchev wrote in
<CAALKErE1Uq1XmXw_8zdij2gGz-GxB9S9PA5f43vYONVKtmRDNA@mail.gmail.com>:
...
|> So i did that (what a mess -- does anyone know how i can create an
|> awk regular expression where parts of the expression is a variable
|> that should be expanded? ugh! what do i know??):
|
|awk -v var1='cont ent' -vv2="$other' ' { code } '
|
|keep in mind that mass spawning of any bin is , when its done massley ,
|very out ..
i fail to see what this has to do with my problem.
|also var so awk processes some \esc caracters
|to cleanly insert data , either use gawk ENVIRON["varname']
|or via alternative fd or as part of file parse things
|my='a b c'
|# one line string
|awk 3<<<"$my thing' BEGIN { f = "/dev/fd/3" ; getline v <f ; close( f ) }
|other main code here '
i am still wondering.
|foo=content
|export foo
|or foo=$foo gawk ..
|gawk -vv=foo ' BEGIN { v = ENVIRON[ v ] } other code '
|same as v = ENVIRON[ "v" ] or "varname"
wow.
|to match in string , thers two ways , one is exact text match , the other
|is regex
|
|if u /foo/ thats a regex
really?
|$0 ~ "foo"
|
|tx=" my text "
|if ( $0 ~ "pre" tx "stu" ) { ye }
this does not work the way you think maybe?
I surely was there myself.
|thers additional stuff to say containing substr() and match() , and some
even with match() not (in a global match line).
|others
|
|#exact
|etx = " exact "
|if ( index( $0 , etx ) ) { ye }
|if ( index( $0 , "pre" etx "stu" ) ) { ye }
i am really impressed.
But that did not work out.
--steffen
|
|Der Kragenbaer, The moon bear,
|der holt sich munter he cheerfully and one by one
|einen nach dem anderen runter wa.ks himself off
|(By Robert Gernhardt)
- Re: Idea: jobs(1) -i to print only :%ID:s, (continued)
- Re: Idea: jobs(1) -i to print only :%ID:s, Steffen Nurpmeso, 2023/11/09
- Re: Idea: jobs(1) -i to print only :%ID:s, Robert Elz, 2023/11/09
- Re: Idea: jobs(1) -i to print only :%ID:s, Steffen Nurpmeso, 2023/11/09
- Re: Idea: jobs(1) -i to print only :%ID:s, Steffen Nurpmeso, 2023/11/09
- Re: Idea: jobs(1) -i to print only :%ID:s, Robert Elz, 2023/11/09
- Re: Idea: jobs(1) -i to print only :%ID:s, Steffen Nurpmeso, 2023/11/09
- Re: Idea: jobs(1) -i to print only :%ID:s, alex xmb sw ratchev, 2023/11/09
- Re: Idea: jobs(1) -i to print only :%ID:s,
Steffen Nurpmeso <=
- Re: Idea: jobs(1) -i to print only :%ID:s, alex xmb sw ratchev, 2023/11/09
- Re: Idea: jobs(1) -i to print only :%ID:s, alex xmb sw ratchev, 2023/11/09
- Re: Idea: jobs(1) -i to print only :%ID:s, Oğuz, 2023/11/09
- Re: Idea: jobs(1) -i to print only :%ID:s, Steffen Nurpmeso, 2023/11/10
- Re: Idea: jobs(1) -i to print only :%ID:s, Greg Wooledge, 2023/11/10
- Re: Idea: jobs(1) -i to print only :%ID:s, Steffen Nurpmeso, 2023/11/10
- Re: Idea: jobs(1) -i to print only :%ID:s, Eric Pruitt, 2023/11/10
- Re: Idea: jobs(1) -i to print only :%ID:s, Greg Wooledge, 2023/11/10
- the portability of seq(1) (was: Idea: jobs(1) -i to print only :%ID:s), G. Branden Robinson, 2023/11/10
- Re: the portability of seq(1) (was: Idea: jobs(1) -i to print only :%ID:s), Greg Wooledge, 2023/11/10