
askforunix
New User
Jan 17, 2013, 4:47 AM
Post #1 of 3
(2206 views)
|
Get value in single quote
|
Can't Post
|
|
I am trying to create a script in linux but facing some problem. In single quote, i cannot get any value from outside as per rule. Suppose my raw data is 134 PTR server1.example.com. 135 PTR server2.example.com. and i want to change it to 134.0.168.192.in-addr.arpa. PTR server1.example.com. 135.0.168.192.in-addr.arpa. PTR server2.example.com. below value get always change 0.168.192 so i have set one variable i.e. VALUE=0.168.192 if i use this command then it is not taking value. Can we achieve this with perl ? cat file.txt | awk '{print $1".$VALUE.in-addr.arpa.", $2, $3}' so please suggest
|