Hi,
I want to print 130 fileds using formatted printing in AWK. It looks like
awk '{printf ("%7.2f%7.2f...%7.2\n",$1,$2,...,$130)}' inflie>oufile
But it gives me an error:
Word too long!
Can you please help me with this? Is there another way to do this? (1 Reply)
All,
I am attempting to print the tenth ($COPY2) varaibales into one file.
But i am finding that all variables are being outputted except for $10.
Can someone help!!!!
Code Below
----------
echo $SERVER $IMAGE $IMAGEDAY $IMAGEMONTH $IMAGEYEAR $COPY1 $EXPIREDAY $EXPIREMONTH... (1 Reply)
Hi everyone,
Ok here's the scenario.
I have a control file like this.
component1,file1,file2,file3,file4,file5
component2,file1,file2,file3,file4,file5I want to do a while loop here to read all files for each component.
file_count=2
while ]
do
file_name=`cat list.txt | grep... (2 Replies)
HI,
This is the code I am using:
awk -v aaa="connect" 'BEGIN {IGNORECASE} /aaa/,/!/ {print NR}' bb
This does not throw any error but it does not work. Pls help
Thanks. (4 Replies)
Hi
I am having a file like this
##############################
j=1
while ]
do
temp_5=MODULE$j
awk '
$1 ~ /'${!temp_5}'/ {
do something }1' file1 > file2
((j = j +1 ))
done ###################
Setting the variables like this (8 Replies)
Heyas
Me try to print only the value of a (specific) variable assignment from a file.
What i get (1):
:) tui $ bin/tui-conf-get ~/.tui_rc TUI_THEME
dot-blue
""
"$TUI_DIR_INSTALL_ROOT/usr"
"$TUI_DIR_INSTALL_ROOT/etc/tui"
"$TUI_PREFIX/share/doc/tui"
"$TUI_PREFIX/share/tui"... (2 Replies)
Hi,
If i were to do this an print out the file, it will show as it is in the command
$ awk '/Privilege Use/ {P=0} /Object Access/ {P=1} P' AdvancedAudit.txt
Object Access
File System No Auditing
Registry No Auditing
Kernel... (1 Reply)
Hi, so i have this command:
ps axo cmd=,user=,%cpu=,priority= --sort=-%cpu | awk '{print $2}'
And i want to print the second column, that is user. The thing is that i dont know why this is my output:
root
Eskizoi+
Eskizoi+
axo
{print
I dont know why axo and {print are there, the... (20 Replies)
i have a unique scenario id like help with.
im currently running this command and it does what i want:
printf '%s\n' "${RawContent}" | awk '/## Beginning Stages ##/,/## Ending Stages ##/' | awk '!/^#.*\!|^#\!|DefaultError/'
Can this be shortened? I'm looking for something portable as... (8 Replies)
Discussion started by: SkySmart
8 Replies
LEARN ABOUT LINUX
igawk
IGAWK(1) Utility Commands IGAWK(1)NAME
igawk - gawk with include files
SYNOPSIS
igawk [ all gawk options ] -f program-file [ -- ] file ...
igawk [ all gawk options ] [ -- ] program-text file ...
DESCRIPTION
Igawk is a simple shell script that adds the ability to have ``include files'' to gawk(1).
AWK programs for igawk are the same as for gawk, except that, in addition, you may have lines like
@include getopt.awk
in your program to include the file getopt.awk from either the current directory or one of the other directories in the search path.
OPTIONS
See gawk(1) for a full description of the AWK language and the options that gawk supports.
EXAMPLES
cat << EOF > test.awk
@include getopt.awk
BEGIN {
while (getopt(ARGC, ARGV, "am:q") != -1)
...
}
EOF
igawk -f test.awk
SEE ALSO gawk(1)
Effective AWK Programming, Edition 1.0, published by the Free Software Foundation, 1995.
AUTHOR
Arnold Robbins (arnold@skeeve.com).
Free Software Foundation Nov 3 1999 IGAWK(1)