D
D
Dima2017-08-03 18:45:24
css
Dima, 2017-08-03 18:45:24

How to determine the field number $ in AWK? in line $0, whose value matches the pattern you are looking for?

I am parsing a file with a variable number of fields in the lines, fields of the form name="value".
Need to find all fields with the given name .
It is clear how to find $0 in the entire line, but how to determine the field number with the desired name?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Smeecy Smeecy, 2019-03-12
@Wekeed

What's wrong with flexbox?

A
Alexander Mangazeev, 2019-03-12
@alex3287

definitely flexbox )

V
vaflya, 2019-03-12
@vaflya

About:

<style type="text/css">
  .warp {
    display: flex;
  }
</style>

<form method="POST" action="index.php">
  <div class="warp">
    <div>Цена</div>
    <div><input type="text"></div>
    <div>комиссия</div>
  </div>
  <div class="warp">
    <div>Яндекс деньги</div>
    <div><input type="text"></div>
    <div></div>
  </div>
  <div class="warp">
    <div>телефон</div>
    <div><input type="text"></div>
    <div></div>
  </div>
  <div class="warp">
    <div>телефон</div>
    <div><textarea></textarea></div>
  </div>
  <div class="warp">
    <div>капча</div>
    <div><input type="text"></div>
    <div><img></div>
  </div>
  <div class="warp">
    <div>текст текст тексттекст текст тексттекст текст тексттекст текст тексттекст текст текст</div>

Add the styles yourself. For you, the main display: flex property - which allows you to line up blocks inside yourself

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question