10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
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
2. Shell Programming and Scripting
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)
Discussion started by: cmccabe
2 Replies
3. Shell Programming and Scripting
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)
Discussion started by: cmccabe
2 Replies
4. Shell Programming and Scripting
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)
Discussion started by: cmccabe
2 Replies
5. Programming
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)
Discussion started by: mahi_mayu069
2 Replies
6. Shell Programming and Scripting
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)
Discussion started by: selvankj
19 Replies
7. UNIX for Dummies Questions & Answers
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)
Discussion started by: Ariean
2 Replies
8. Shell Programming and Scripting
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)
Discussion started by: dhanamurthy
6 Replies
9. Shell Programming and Scripting
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)
Discussion started by: dhanamurthy
3 Replies
10. Shell Programming and Scripting
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)
Discussion started by: psynaps3
1 Replies