Assign Values to a Variable in While Loop and Update the File


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Assign Values to a Variable in While Loop and Update the File
# 8  
Old 05-15-2018
Thank You So much Corona, i guess this should be good enough for me and meets my requirement
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to assign awk values to shell variable?

Hi Gurus, I have a script which assign awk output to shell variable. current it uses two awk command to assign value to two variables. I want to use one command to assign two values to two variables. I tried the code, but it does't work. kindly provide your suggestion. current code... (2 Replies)
Discussion started by: green_k
2 Replies

2. Shell Programming and Scripting

Do While Loop + Read From File + assign line to a variable

Hello, I am using below code for reading from a file and assigning the values to a variable , but it is loosing the value after the loop , please suggest to retain the value of the variable after the loop , while IFS=: read -r line do set $dsc=$line echo 'printing line variable ' $line... (1 Reply)
Discussion started by: ParthThakkar
1 Replies

3. Shell Programming and Scripting

Unable to read assign values to two variables in while loop

I am trying to read a input file which has two columns separated by space Input file server1 server2 server3 server4 server5 server6 When i execute the below while code it reads line by line and a and b variables are able to successfully fetch the values while read a b do echo "$a" echo... (5 Replies)
Discussion started by: chidori
5 Replies

4. Shell Programming and Scripting

Assign variable name through loop

Hi As bash does not support multidimensional arrays (?), I need some help with a problem. What I want to do is to assign variable names containing a counter in a loop . what I want to do is basically something like this: #!/bin/bash for i in {1..8}; do var$i = "some command" done... (6 Replies)
Discussion started by: Tobbev
6 Replies

5. UNIX for Dummies Questions & Answers

How to assign values to variable in given scenario

Hi i have one variable like DIR="f1 f2" in config file in my script i have one runtime variable LFILE="DIR" now i want to use $DIR in my script by using LFILE that is i dont want to use DIR dirctly i am extracting DIR by some other means. Config file : DIR="f1 f2" Script: LFILE="DIR" i... (3 Replies)
Discussion started by: sriram_gec
3 Replies

6. UNIX for Advanced & Expert Users

How to read a text file and assign the values in the same to a variable in loop

Hi, I have a text file with multiple lines, each having data in the below format <DOB>,<ADDRESS> I have to write a script which reads each line in the text file in loop, assign the values to these variables and do some further processing in it. Using the following code prints the values... (12 Replies)
Discussion started by: manishab00
12 Replies

7. Fedora

How to read a text file and assign the values in the same to a variable in loop

Hi, I have a text file with multiple lines, each having data in the below format <DOB>,<ADDRESS> I have to write a script which reads each line in the text file in loop, assign the values to these variables and do some further processing in it. Using the following code prints the... (1 Reply)
Discussion started by: manishab00
1 Replies

8. Shell Programming and Scripting

Assign values to variable

Hi Masters, I want to assign the values of one variable to another variable. Here the varaible name 'var' is dynamic. I know the values of V_2 and U_3, but If the i/p of TYPE is 'U' and the NO is 3, then I want to assign the values of U_3 to var. How we can achieve it? TYPE="U"... (4 Replies)
Discussion started by: ecearund
4 Replies

9. Shell Programming and Scripting

Read the csv file and assign the values in to variable

I have a csv file with the values seperated by commas.I want to extract these values one by one and assign to a variable using shell script.Any ideas or code? (11 Replies)
Discussion started by: rajbal
11 Replies

10. Shell Programming and Scripting

Read a file and assign the values to a variable

i have a file in this format curyymm PRVYYMM CDDMmmYY bddMmmyy eddMmmyy --------- ------- ------------ ---------- ----------- 0906 0905 09Jun09 01Jun09 30Jun09 ----------- --------- ------------ ------------ ----------- i need to read the... (5 Replies)
Discussion started by: depakjan
5 Replies
Login or Register to Ask a Question
POE::Loop::Tk(3pm)					User Contributed Perl Documentation					POE::Loop::Tk(3pm)

sub skip_tests {
  return "Tk needs a DISPLAY (set one today, okay?)" unless (
    (defined $ENV{DISPLAY} and length $ENV{DISPLAY}) or $^O eq "MSWin32"
  );
  my $test_name = shift;
  if ($test_name eq "k_signals_rerun" and $^O eq "MSWin32") {
    return "This test crashes Perl when run with Tk on $^O";
  }
  return "Tk tests require the Tk module" if do { eval "use Tk"; $@ };
  my $m = eval { Tk::MainWindow->new() };
  if ($@) {
    my $why = $@;
    $why =~ s/ at .*//;
    return "Tk couldn't be initialized: $why";
  }
  return; }

NAME
POE::Loop::Tk - a bridge that allows POE to be driven by Tk SYNOPSIS
See POE::Loop. DESCRIPTION
POE::Loop::Tk implements the interface documented in POE::Loop. Therefore it has no documentation of its own. Please see POE::Loop for more details. POE::Loop::Tk is one of two versions of the Tk event loop bridge. The other, POE::Loop::TkActiveState accommodates behavior differences in ActiveState's build of Tk. Both versions share common code in POE::Loop::TkCommon. POE::Loop::Tk dynamically selects the appropriate bridge code based on the runtime environment. SEE ALSO
POE, POE::Loop, Tk, POE::Loop::TkCommon, POE::Loop::PerlSignals. AUTHORS &; LICENSING Please see POE for more information about authors, contributors, and POE's licensing. perl v5.10.1 2010-04-11 POE::Loop::Tk(3pm)