printing second variable as many times as first variable

Balan

I have two variables. $a and $b in a for loop. $a has several lines of values. Example.

$a=
````1
````23
````4
````5
````6

and $b has a single value. Example.

$b=
````x

I want my output as follows

1    x
23   x
4    x
5    x
6    x
user218374
set -f;
for i in $a; do echo "$i $b"; done

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Printing first line then assign to a variable

From Dev

Printing a character a variable number of times with println

From Dev

Python: Check second variable if first variable is True?

From Dev

Printing first variable (index=0) at the end

From Dev

Counting how many times variable has changed

From Dev

Declare variable in first statement then set as parameter in second

From Java

Java second variable dismisses first one

From Dev

javascript: modifying second variable modifies first

From Dev

two variables in one loop - first as a second variable

From Dev

Return single variable (not list) multiple times to function from second function?

From Dev

Printing only the first level attributes in the hierarchy of a variable in PHP

From Dev

Why does printing a structure variable give the value of the first element?

From Dev

Printing First Variable in Awk but Only If It's Less than X

From Dev

counting how many times a variable changes score by group

From Dev

Count how many times button is clicked without using global variable

From Dev

Can static variable be initialized many times, because of class unloading?

From Dev

How can I display a div as many times as is stored in a PHP variable?

From Dev

Create variable that counts progressively how many times an ID is repeated in a day

From Dev

Enter a variable x many times in the same line Python

From Dev

How to count how many times a global variable was used (read and write)?

From Dev

It is better to call a Room DataBase query many times or create a variable?

From Dev

Call a method in a class many times and the variable stays consistent

From Dev

How many times can you post a PHP $_POST[''] Variable?

From Dev

Creating variable based on how many times a value is duplicated in R

From Dev

R - change the first two times of a variable in each row into NAs

From Dev

First day and last day of times series depending on a dummy variable SQL

From Dev

Why is the second list in this code printing three times?

From Dev

How to combine arrays and repeat first array's elments as many times as the length of the second array?

From Dev

Calculate how many times is the first column greater than or equal to the second column using R

Related Related

  1. 1

    Printing first line then assign to a variable

  2. 2

    Printing a character a variable number of times with println

  3. 3

    Python: Check second variable if first variable is True?

  4. 4

    Printing first variable (index=0) at the end

  5. 5

    Counting how many times variable has changed

  6. 6

    Declare variable in first statement then set as parameter in second

  7. 7

    Java second variable dismisses first one

  8. 8

    javascript: modifying second variable modifies first

  9. 9

    two variables in one loop - first as a second variable

  10. 10

    Return single variable (not list) multiple times to function from second function?

  11. 11

    Printing only the first level attributes in the hierarchy of a variable in PHP

  12. 12

    Why does printing a structure variable give the value of the first element?

  13. 13

    Printing First Variable in Awk but Only If It's Less than X

  14. 14

    counting how many times a variable changes score by group

  15. 15

    Count how many times button is clicked without using global variable

  16. 16

    Can static variable be initialized many times, because of class unloading?

  17. 17

    How can I display a div as many times as is stored in a PHP variable?

  18. 18

    Create variable that counts progressively how many times an ID is repeated in a day

  19. 19

    Enter a variable x many times in the same line Python

  20. 20

    How to count how many times a global variable was used (read and write)?

  21. 21

    It is better to call a Room DataBase query many times or create a variable?

  22. 22

    Call a method in a class many times and the variable stays consistent

  23. 23

    How many times can you post a PHP $_POST[''] Variable?

  24. 24

    Creating variable based on how many times a value is duplicated in R

  25. 25

    R - change the first two times of a variable in each row into NAs

  26. 26

    First day and last day of times series depending on a dummy variable SQL

  27. 27

    Why is the second list in this code printing three times?

  28. 28

    How to combine arrays and repeat first array's elments as many times as the length of the second array?

  29. 29

    Calculate how many times is the first column greater than or equal to the second column using R

HotTag

Archive