Hi,
Is there some way to get formatted output in ksh? Something like a properly alligned tabular format. I tried adding '\t' to echo statements, but it doesn't come properly alligned
'hello' A simple Hello
'helloworld' A helloworld statement
I need the second coloumn to... (1 Reply)
Hi
I have the following records in a file
SABN YOURTUBE 000514 7256
SACN XYOUDSDF 000514 7356
SADN KEHLHRSER 000514 7656
SAEN YOURTUBE 000514 7156
SAFN YOURTUBE 000514 7056
I need to put this in the format like this
printf '%s %-50s %6s %-6s\n'
I am not going to read individual... (3 Replies)
Hi
I have the following lines in a file
SWPRC000001NOT STATED 1344
SWPRC000001NOT STATED 1362
SWPRC000001NOT STATED 1418
SWPRC000001NOT STATED 1436
SWPRC000001NOT STATED ... (6 Replies)
Can you please tell me how to just get only the output of dealers I & V information along with their subtotals in the next line of the file and create a new file, The dealer position along with corresponding totals may change everyday to any position above or below in the file, please help Thanks (2 Replies)
Hi,
i have a script, which is incomplete, am on my way developing it.
Input
1,12,2012,IF_TB001
2,12,2012,3K3
3,Z56,00000,25,229,K900,00, ,3G3, ,USD, ,0000000000,000, , , , 550000000
3,Z56,00000,53,411,W225,00,000, , ,USD,OM170,0000000000,000, , , , -550000000
4,Z56,COUNT, 4,SUM LOC,... (19 Replies)
Hi Techies,
I'm a newbie to PERL, Please help me with following problem.
I have an input text file like below
cat Input.txt
418673132,P
492538858,P
384535478,P
521522357,I
529435679,I
183617024,P
184414408,I
735510689,P
736238343,I
411642045,I
412690979,I
104232783,I (2 Replies)
I am just trying to output the below awk separated by tabs. Thank you :).
awk (added OFS as an attempt to itroduce tabs)
awk '{split($5,a,"-"); OFS='\t' print $1,$2,$3,a}' file.bed > test.bed
The awk runs and produces all the data in 1 field instead of 4 fields.
current output
... (2 Replies)
In the below awk the output is space delimited, but it should be tab delimited. Did I not add the correct -F and OFS? Thank you :).
The input file are rather large so I did not include them, but they are tab-delimeted files as well.
awk
awk -F'\t' -v OFS='\t' 'FNR==1 { next }
> ... (2 Replies)
In the below awk written by @RavinderSingh13 I have added a few lines and am trying to have the output be tab-delimited. The input is space-delimeted and the portion in bold seems to add a tab to the Not found but not the found. Thank you :).
file1
One 1
Two 2
Three 3
file2
One 1... (2 Replies)
The awk below executes and produces the current output. it skips the header in row 1 and prints $4,$5,$6 and then adds the header row back.
The problem is that it keeps the tailing tab and prints it in front of $1. I could add a pipe to remove the tab, but is there a better way to do it with on... (7 Replies)
Discussion started by: cmccabe
7 Replies
LEARN ABOUT CENTOS
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)