Search Results

Search: Posts Made By: ramprabhum
935
Posted By RudiC
Try awk ' {AL = index ($0, "<") ...
Try
awk '
{AL = index ($0, "<")
gsub (/<.?name>|^ */, _)
}
{printf "%s%s%s", AL==9?ORS:"", $0, AL==9?"\t":","
}
END {printf ORS
}
' file...
2,453
Posted By RudiC
That file has DOS line terminators (<CR>, 0X0D)....
That file has DOS line terminators (<CR>, 0X0D). Get rid of them and it will fly.
2,453
Posted By Aia
This is a guess: Your terminal output doesn't...
This is a guess:
Your terminal output doesn't wrap and it is overwriting itself several times.

You could always test it by redirecting to a file instead of the screen.
3,650
Posted By Chubler_XL
Remove -q form first grep in pipe (-q causes no...
Remove -q form first grep in pipe (-q causes no output and sets the return status so should only be used on last grep in chain):

ls -l "$file" | grep -q "$TIMEMATCH" | grep -q "^-" && echo $file
3,650
Posted By Chubler_XL
Unfortunately your options for date...
Unfortunately your options for date manulipitation under AIX 6.3 are limited.

I'd suggest using perl to convert entered date to epoch time and work with that.

#!/bin/ksh

printf "Enter...
5,389
Posted By RudiC
How about array=( $(awk -F ' ' '{ print $NF }'...
How about array=( $(awk -F ' ' '{ print $NF }' log filename) )
11,425
Posted By Corona688
Why are you trying to do this? Dynamic variable...
Why are you trying to do this? Dynamic variable names are generally a terrible idea, and the usual things people want them for are often easily solved by other methods.
11,425
Posted By MadeInGermany
eval runs the evaluation twice eval con=\$var$i...
eval runs the evaluation twice
eval con=\$var$i
After the first evaluation this becomes e.g.
con=$var1
11,425
Posted By Don Cragun
You can't directly expand a variable with a...
You can't directly expand a variable with a variable name. Here is a Korn shell script that provides four ways to do what you seem to be trying to do. Note that if the values you're assigning to...
11,425
Posted By in2nix4life
The shell thinks you're performing a parameter...
The shell thinks you're performing a parameter expansion.

Try this:


con=var$i
Showing results 1 to 10 of 10

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