Search Results

Search: Posts Made By: Boomn4x4
1,298
Posted By Boomn4x4
Add newline to regex
I have a perl script that runs a program and puts the output of the program into a variable. The output of the file looks like:
Statistics 0
AverageTime: [0,0]
Statistics 0
AverageTime:...
2,082
Posted By Boomn4x4
The print statements failed with the "." and the...
The print statements failed with the "." and the "/n" so I had to put the "." in quote and put some other quotes in to accomodate spacing and the /n got removed... but it works

Thank you.
2,082
Posted By Boomn4x4
Thanks, that saved some trouble, however, my...
Thanks, that saved some trouble, however, my output is putting out literal text, not the variable value. My output:

myip1 myhost1.test.com myhost1
myip2 ...
2,082
Posted By Boomn4x4
Passing variables into AWK
I'm trying to use awk to write new entries to a hosts file if they don't exist. I need to do so depending on the type of system I have. Below is what I have, but it isn't working.

awk -v...
22,243
Posted By Boomn4x4
getting first two characters of variable
From a shell script, I'm trying to get the first two characters of an environment variable.

If I type at the command promot:
XX=`echo $MYVAR | cut -c1-2`
echo $XX
It works just fine

However,...
Showing results 1 to 5 of 5

 
All times are GMT -4. The time now is 08:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy