Can anyone please help me with the below scenario in korn shell script.
Can anyone please give me some hints to proceed on this.
I have a Flat file of the below format.
Input file format:
Rules
File Column delimiter is |
ID column will not have multipe values seperated by commas.
Columns which have values separated by commas, should be made into a New row.
Columns which do not have values , no need make them into New row.
Last column Orequired is to be concatenated with appropriate Os value in order as highlited below.
Output file format requested
Last edited by radoulov; 05-21-2011 at 05:38 PM..
Reason: Code tags.
I am attempting to write a korn shell script that does the following, but I am getting errors. I'm new to korn shell scripting and am not sure what I am doing wrong. Please help with example scripts. Thanks.
1) check for day of the week
2) if day of the week is Monday then check for the... (4 Replies)
I am trying to write SQL query output into a .csv file. But in the output columns are displaying in different lines instead of coming in one line.
Main Code shell script:
this is my code:
#!/bin/bash
file="db_detail.txt"
. $file
rm /batch/corpplan/bin/dan.csv... (6 Replies)
I want to write a korn shell script to get the latest three versions for a file in the directory having lot of files with various versions (files with prefix as same but time stamp as suffix) and compress it and at the same time have to remove the remaining versions of the file (other than latest... (4 Replies)
Hi,
I have files in the directory like below which I need to validate if all the required files are present.
A_B_001 of 002_time1.txt
A_B_002 of 002_time1.txt
A_B_001 of 001_time2.txt
Scenarios-
a)If file with 001 of 002_time1 or 002 of 002_time1 is missing in the folder,script should... (6 Replies)
Hi,
Can anyone please help me with this issue.
I have a Awk command which take file as input, and provides the output having multiple lines, its working in command mode, but not if i plug it in script.
#!/bin/ksh
infile=a.txt
outfile=b.txt
awk '
BEGIN{
FS=OFS="|";ORS = "\n";... (1 Reply)
Hi..
This is step to telnet from linux to my window telnet server and run a program called CLISMS.exe. As your information, the program will be sent out a sms to my mobile number. The step as below:-
telnet 123.123.123.123
Trying 123.123.123.123...
Connected to 123.123.123.123.
Escape... (1 Reply)
Hi,
I am new to this unix scripting, I got a requirement like..
Files with *.XML extension will be generating in a /home/sample/ folder for every 15 mins. I need to monitor those files in that particular folder for every hour.
If no file has been generated in that particular folder for an... (7 Replies)
Hello,
How do I write a korn shell that will rename file with the current date. What I want to do is, I have a file that is re-written every day. But instead, I want to keep a 14 day history of the file. So I want to write a script that will rename the current file with a date attached to the... (2 Replies)
I am attempting to itterate through a file that has multiple lines and for each one read the entire line and use the value then to search in other files. The problem is that instead of an entire line I am getting each word in the file set as the value I am searching for. For example in File 1... (2 Replies)