01-11-2011
Thanks Scrutinizer. it worked
im using this command in windows batch script. Can i assign the output of this command to windows varaible.i tried in unix format using grave accent (`) but it is not working. i want to assign this to a varaible in windows like
set check=`awk -v val1=$starttime -v val2=$endtime 'BEGIN{ if ( length(val1)==6 && length(val2)==6 && val2 > val1 ) print "yes"}'`
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi all,
I have a problem with qwk command.
i have to check process status and for that i am using command
prstat -mvL 1 1
and it gives me the entire output
but when i use this command with awk like this:
prstat -mvL 1 1 | awk -F" " '{print $1,$15}'
to get first and 15th arguments.
... (3 Replies)
Discussion started by: usha rao
3 Replies
2. Shell Programming and Scripting
Hi All,
I am hoping someone can help me with some scripting I need to complete using AWK.
I'm trying to process multiple fixed files to generate one concatenated fixed file in a standard format.
The Input file is:-
aaaa bbbbb ccccc 1 xxxx aaa bbb
aaaa bbbbb ccccc 2 abcd aaa CCC... (9 Replies)
Discussion started by: jason_v_brown
9 Replies
3. Shell Programming and Scripting
Hi Gurus,
I need a suggestion, please help. I have a input file as below :
abc.txt :
*
xxxx: 00000
xxxxx: 00000
xxxx: RANDOM
xxx: RANDOM
**************************xxxxxxx***
* abc
******************************
abc:
abc: ... (3 Replies)
Discussion started by: arunshankar.c
3 Replies
4. Shell Programming and Scripting
Hi...Does anyone know how to input huge file about 25 GB to awk
if single file then this works
awk '{print}' <hugefile
suppose if have to use something like this
awk FNR==NR{x=$0;next}{print $0,x}' hugefile1 hugefile2
then how to redirect ? and is there any provision to assign memory... (12 Replies)
Discussion started by: Akshay Hegde
12 Replies
5. Shell Programming and Scripting
Hi All,
Do we know how to read input file within awk script and send output toanother log file. All this needs to be in awk script, not in command line. I am running this awk through crontab.
Cat my.awk
#!/bin/awk -f
function test(var){
some code}
{
}
END
{
print"test code"
} (5 Replies)
Discussion started by: random_thoughts
5 Replies
6. UNIX for Dummies Questions & Answers
I have one input file ABC.txt and one output DEF.txt. After the ABC is processed and created output, I want to rename ABC.txt to ABC.orig and DEF to ABC.txt. Currently when I am doing this, it does not process the input file as it cannot read and write to the same file. How can I achieve this?
... (12 Replies)
Discussion started by: High-T
12 Replies
7. Shell Programming and Scripting
The below awk improved bu @MadeInGermany, works great as long as the input file has data in it in the below format:
input
chrX 25031028 25031925 chrX:25031028-25031925 ARX 631 18
chrX 25031028 25031925 chrX:25031028-25031925 ARX 632 14... (3 Replies)
Discussion started by: cmccabe
3 Replies
8. Shell Programming and Scripting
I have files named with different prefixes. From each I want to extract the first line containing a specific string, and then print that line along with the prefix.
I've tried to do this with a while loop, but instead of printing the prefix I print the first line of the file twice.
Files:... (3 Replies)
Discussion started by: pathunkathunk
3 Replies
9. Shell Programming and Scripting
Field1=””
Field2=””
Field3=””
Field4=””
Field5=””
USER INPUT UP TO 5 FIELDS
awk -F , '{ if ( $3 == Field1 && $6 == Field2 && $8 == Field3 && $9 == Field4 && $10 == Field5) print $0 }' /tmp/rodney.outD
INPUT FILE (Rodney.outD):
... (3 Replies)
Discussion started by: rmerrird
3 Replies
10. UNIX for Beginners Questions & Answers
cat filename| awk '{ $1=""; print $0}'
in my file there are few lines that has more than 3000 characters per line and as soon as I run the above command it cores, strings core reveals that the awk is failing because input string too long, limit. can i get some help from the experts to find... (8 Replies)
Discussion started by: knijjar
8 Replies
LEARN ABOUT CENTOS
setsebool
setsebool(8) SELinux Command Line documentation setsebool(8)
NAME
setsebool - set SELinux boolean value
SYNOPSIS
setsebool [ -PNV ] boolean value | bool1=val1 bool2=val2 ...
DESCRIPTION
setsebool sets the current state of a particular SELinux boolean or a list of booleans to a given value. The value may be 1 or true or on
to enable the boolean, or 0 or false or off to disable it.
Without the -P option, only the current boolean value is affected; the boot-time default settings are not changed.
If the -P option is given, all pending values are written to the policy file on disk. So they will be persistent across reboots.
If the -N option is given, the policy on disk is not reloaded into the kernel.
If the -V option is given, verbose error messages will be printed from semanage libraries.
AUTHOR
This manual page was written by Dan Walsh <dwalsh@redhat.com>. The program was written by Tresys Technology.
SEE ALSO
getsebool(8), booleans(8), togglesebool(8), semanage(8)
dwalsh@redhat.com 11 Aug 2004 setsebool(8)