Fairly new scripter so please bare with me if what I have done below is not according to standards.
Okay...heres what I am trying to do. I have a pattern that I need to search for in a directory. This gives me a list of files that includes a control file that contains totals of the line nos for each file.
I need to compare the line no totals in the control file to those of the actual file.
This is what I have written as of now::
Note: $1 = feb99
The control file looks like this:
tmp1 looks like this
So basically what I am trying to do through the script is list all files that contain feb99 and put them in a file tmp1. Then based on pattern matches eg field1 CLM from ism_control_feb99.dat is used to search for ism_clmp_feb99.dat and field3 000000260057 from the control file is mathed with wc -l of actual file ie ism_clmp_feb99.dat and then send email.
Below is the error I am getting on executing script(Have already tried nawk/gawk):
Thanks reborg and Gop...i did not completely understand reborgs script--what is typset?
So I continued to work on the one from gop. This is what worked for me:
Again...thanks a lot people...u guys are wonderful!
Last edited by alfredo123; 02-27-2007 at 04:17 PM..
Ggod evening.
I need your help please, in a Production system there is a process that download a xls file from an URL which is IMF(International Monetary Fund) and afterwards to be loaded into a databse table.
When testing conectivity from a unix server to IMF seems to work but when editing it... (9 Replies)
Hello ALL ,
i am requesting help on for this script i am preparing to get the result of a query in a excel sheet :
current Error:
Script : NO Excel file created.
requesting to know where i am going wrong.
#!/bin/ksh... (2 Replies)
Hi All,
I am using the below script which has awk command, but it is not returing the expected result. can some pls help me to correct the command.
The below script sample.ksh should give the result if the value of last 4 digits in the variable NM matches with the variable value DAT. The... (7 Replies)
Discussion started by: G.K.K
7 Replies
4. Forum Support Area for Unregistered Users & Account Problems
Hi
I have a problem to resolve, I think sed is the best option, and I am not successful yet.
Have a UNIX file which has records as of the 2 character state codes like
NY
NJ
PA
DE
From the file I need to create this as a variable in the same script or another file -... (7 Replies)
Hi,
I'm very new to bash scripting and Linux in general. I'm running Ubuntu Server 10.04 and trying to write a bash script to launch a program. In doing so, I've come across a couple of things that I obviously don't understand. Here is a short script that exemplifies those things:
... (9 Replies)
Hello Folks,
I would very much appreciate if I could get help/suggestions on a particular sed usage. I have to write a script to take version info from a version file, compute the image name, print error if the image does not exist.
The version file looks like below:
"
#
# version.cfg
#... (3 Replies)
I gotta write a command to change the accounts in /etc/passwd that use a shell other than the bash to bash shell. those accounts that dont use a shell shouldnt get modified. assuming all the shell programs end in sh and other programs dont. and the result should go into /etc/passwd.rev
any hint? (4 Replies)
Ladies/Gentlemen,
I am looking for a web-based tool to keep track of my Sun inventory. The following list of fields are fields I would like to store: Root Passwd (needs to be secure) / Hostid / Console Port / IP Address / Platform / Application / Hostname . . . you get the point.
Do any of... (4 Replies)
Hello all. I want some help procmail receipe. I tried to get some mails' sender and receiptient. Then tried to send them a bash script. But it didnot work. I try a lot of variation of the below receipe. Could anyone can help what is wrong on my receipe? Or if the recepie is correct what can be... (0 Replies)