Search Results

Search: Posts Made By: Northerner
8,815
Posted By Northerner
Badly formed number.
I have the following script running every day numerous times a day and it works fine, but very occasionally I get the following error

if: Badly formed number.

Anyone know why?

Here is the...
4,689
Posted By Northerner
Its ok I just left aligned the printf and all...
Its ok I just left aligned the printf and all looks good

awk '{ printf ("%-5s%-6s%-9s%-5s%-3s%-35s%-14s\n", $1, $2, $3, $4, $5, $6, $7) }'
4,689
Posted By Northerner
Checked the file and you are correct the input...
Checked the file and you are correct the input file is wrong, so I think with the help of Radoulov and Era I've got there, many thanks indeed.
4,689
Posted By Northerner
The original file2 had the following 0508...
The original file2 had the following

0508 2206 LVTS5431 98 1
0506 0920 LVTS5750 141 3

but the output to file3 shows
0506 0920 LVTS5750 41 3nw_unix_live_dmz_duplex_35_35 NRUCCAE09-MGT
...
4,689
Posted By Northerner
The output from this awk command is 0508 0601...
The output from this awk command is
0508 0601 LVTS4687 58 1ltreb_shu1l110 shu1l110
0509 0108 LVTS4687 58 1ltreb_shu1l110 shu1l110
0509 0108 LVTS4687 58 1ltreb_shu1l110 shu1l110
0509 0108...
4,689
Posted By Northerner
Having tested this on the simple files I provided...
Having tested this on the simple files I provided it appears it doesn't work on the more complexed files. The first file has 6 field separated by blanks

File1

LVTS4687 LVTSHPLON ltreb_shu1l110...
5,661
Posted By Northerner
I'm sorry I get the same result with full path...
I'm sorry I get the same result with full path specified.
5,661
Posted By Northerner
Got the following result cat file1.txt |...
Got the following result

cat file1.txt | while read line
while: Expression syntax.

from

#!/bin/ksh

cat file1.txt | while read line
do
JOBNAME=$(echo ${line} | awk '{print $3}')...
4,689
Posted By Northerner
Brilliant Thanks very much indeed!
Brilliant Thanks very much indeed!
4,689
Posted By Northerner
Help with scripting
I have 2 files with a common parm - Jobname

File 1
0507 1202 JOBA
0507 1302 JOBB
0507 1452 JOBC
0507 1552 JOBA
0507 1553 JOBA

File2

JOBA abcdefg server4
JOBB defghij server22
JOBC...
5,661
Posted By Northerner
Join file contents via common field
I have 2 files with a common parm - Jobname

File 1
0507 1202 JOBA
0507 1302 JOBB
0507 1452 JOBC
0507 1552 JOBA
0507 1553 JOBA

File2

JOBA abcdefg server4
JOBB defghij server22
JOBC...
Showing results 1 to 11 of 11

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