Sponsored Content
Top Forums Shell Programming and Scripting Can any programmer do this task in shell script... Post 302734927 by Don Cragun on Friday 23rd of November 2012 05:42:45 AM
Old 11-23-2012
Looking at the Output_needed_format.txt file and looking at the 1st 9 lines, I thought I saw a pattern and knew what you wanted. But, the last 9 lines (not exactly corresponding to the #Levels value 10 and having no data in the z* columns and the 1* columns in the output) don't make any sense to me.

If you want our help on this, please post the complete output that you want to get from the following entries in Input.txt:
Code:
 OUTPUT FROM ASCII FILE: CAST #1
 OUTPUT FROM ASCII FILE: CAST #2
 OUTPUT FROM ASCII FILE: CAST #3
and
 OUTPUT FROM ASCII FILE: CAST #50

and answer a few questions:
  1. The input records have data in columns with headers z, 1, 2, and 3. Does the code we supply need to make a pass through the input for the exact set of fields supplied in the files to be processed, or should the code always assume there are just the above four sets of data included in Input.txt?
  2. Does the code need to reformat floating point values to remove trailing zeros, or can it just print the values found in the input?
  3. When printing floaing point values, do the decimal points need to line up?
  4. Does the code need to verify that the #Levels field value exactly matches the number of data lines after the z header line? If so, what should be done if there is a mismatch? Should the code make any other data validity checks? If so, what checks and what should be done if the checks fail?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Optimized way of doing the task in shell programming

Hi I have a file consists of the following similar lines (10 mb file) 2008-05-15 02:15:38,268 RMSConnectionFactory - Setting session state for connection. 2008-05-15 02:15:38,277 RMSConnectionFactory - Returning WS connection. My task is to find out any missing second lines for... (14 Replies)
Discussion started by: pcjandyala
14 Replies

2. Shell Programming and Scripting

comment and Uncomment single task out of multiple task

I have a file contains TASK gsnmpproxy { CommandLine = $SMCHOME/bin/gsnmpProxy.exe } TASK gsnmpdbgui { CommandLine = $SMCHOME/bin/gsnmpdbgui.exe I would like to comment and than uncomment specific task eg TASK gsnmpproxy Pls suggest how to do in shell script (9 Replies)
Discussion started by: madhusmita
9 Replies

3. Shell Programming and Scripting

BrainBench Certified Shell Programmer..Any1

Hi I am looking for some one who is Brainbench Certified Shell Programmer, who can share his/her experience. Actually I am planning to give exam, but before that wuld lik some1 to throw light on this..also if dumps are availble pls mail me @ niceboykunal123@gmail.com Thanks & Regards,... (1 Reply)
Discussion started by: niceboykunal123
1 Replies

4. Shell Programming and Scripting

last task for my script

hi, infile- create table salary ( occupation_code char(40), earnings decimal(10,2), occ_yearend integer ); outfile- salary:create table salary salary:( occupation_code char(40), salary: earnings decimal(10,2), salary: occ_yearend integer salary:); Thanks. (4 Replies)
Discussion started by: dvah
4 Replies

5. Shell Programming and Scripting

Shell scripting task

Hi all, I am new to shell scripting. And I have a task to do, I tried all possible ways to solve this, but didn't. Iwas wondering maybe someone could help me. So I have a random file something like this Andrew John Mike Alfa Omega Beta And I need to create scrip witch would filter any... (1 Reply)
Discussion started by: Strongid
1 Replies

6. Homework & Coursework Questions

Shell scripting task

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Hi all, I am new to shell scripting. And I have a task to do, I tried all possible ways to solve this, but... (8 Replies)
Discussion started by: Strongid
8 Replies

7. Shell Programming and Scripting

command task script

ksh $CODE/dis/scripts/IS_BTEQ_LZ_TABLE_AUDIT.sh DIS_BTEQ LZ_DIS_LOAD_LOG_KEY > $CODE/dis/logs/lz_table_audit_`date '+%Y%m%d_%H%M%S'`.log 2>&1 Can some one tell me what the above script is doing? As per my understanding we are executing the script and sending the output to a log file. The... (4 Replies)
Discussion started by: karthikkasarla
4 Replies

8. Shell Programming and Scripting

Whether Shell script can do this task ???

In following attached 748phy.xls file, fifth column is ST_Date, which contains time and dates in this format 22-11-2012 7:54:54 PM in single column I want it to split in this format either 1st column 22/11/2012 and in second column 7:54:54 PM Or like this in separate... (13 Replies)
Discussion started by: Akshay Hegde
13 Replies

9. Shell Programming and Scripting

Script for database task.

Hi, I need help in creating script for "User password reset in database" by logging into database from linux server and resetting the user password. Could you please provide the script for this task? Steps are given below. 1. Login into database from server sqlplus... (5 Replies)
Discussion started by: Maddy123
5 Replies

10. UNIX for Beginners Questions & Answers

Need list of input and output parameter of task in a text file, using shell script

//file begin ===== //some code task abcd_; input x; input y,z; //some comment output w; //some comment reg p; integer q; begin //some code end endtask : abcd_ //some code //file end ===== expected output from above... (1 Reply)
Discussion started by: rishifrnds
1 Replies
asciitopgm(1)						      General Commands Manual						     asciitopgm(1)

NAME
asciitopgm - convert ASCII graphics into a portable graymap SYNOPSIS
asciitopgm [-d divisor] height width [asciifile] DESCRIPTION
Reads ASCII data as input. Produces a portable graymap with pixel values which are an approximation of the "brightness" of the ASCII char- acters, assuming black-on-white printing. In other words, a capital M is very dark, a period is ver light, and a space is white. Input lines which are fewer than width characters are automatically padded with spaces. The divisor argument is a floating-point number by which the output pixels are divided; the default value is 1.0. This can be used to adjust the brightness of the graymap: for example, if the image is too dim, reduce the divisor. In keeping with (I believe) Fortran line-printer conventions, input lines beginning with a + (plus) character are assumed to "overstrike" the previous line, allowing a larger range of gray values. This tool contradicts the message in the pbmtoascii manual: "Note that there is no asciitopbm tool - this transformation is one-way." BUGS
The table of ASCII-to-grey values is subject to interpretation, and, of course, depends on the typeface intended for the input. SEE ALSO
pbmtoascii(1), pgm(5) AUTHOR
Wilson H. Bent. Jr. (whb@usc.edu) 26 December 1994 asciitopgm(1)
All times are GMT -4. The time now is 11:01 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy