wait... I have to indent it? Why? Is there a reason for this???
Maybe i didn't do enough researching.
To add, what are "Autocritics"?
I'm learning slowly, but surely
Indent is great help when writing : You see if you follow your logic and have not forgotten something... Your peers are more a mood to read your code if clear...
Autocritics: You run your program, then what have you to say?
I dont know to what point of perfection you are to reach: If its just to see you know how to display, read input, and save values to a file, you achieved the task (basically).
If it should be clean code with minimum drawbacks, then there is more work to it:
You should never enter in an appl. that writes/updates if not necessary/wanted, so a test should be done before entering the main loop.
You cannot come back when entering values, its your choice... (why not...) but if the person entering made an error ?
You should in your second test, test integrity of Input (num for first field, if you are happy with your test on lname why isnt fname tested also?...) and offer a "Cancel" input choice so the user can start again..
Your last test is not very usefull as it is for you use the value for loop testing, what happens if user enters what is required like "Y"?
So here is your code (not optimized , so perfectible... for I have no time at the moment and its your work to do, but added some corrections or ideas for you to develop and work on...)
You should add comments also...
what about a help?( I know in primary task it was not required...)
I did add a little on the bottom, but they are comments until i can figure out what those commands are even for... I really don't know XD
I'll probably just delete that little section.
I use putty > ubuntu for our server @ school... However, some of the codes you typed out for me, didn't work at all, so i had to rework some, with the help of a few friends and a teacher's help as well. Is that an error on my end? orr what?
The script works fine now, but I do need a markup script, which I can basically copy+paste this one in the [ code ], and just modify a few things... But, the variables that i need to add in order to mark product prices automatically for me with a 40% markup for profit. I'd need Product Name, ID Num, and COGS (cost of goods sold) + markup price...
So it'd look something like...
Product Name: Apron
ID number: 00010010
COGS: 10
Markup: 14
Ubuntu has no ksh (my first line... just be replaced by your shell: Most probable=/bin/bash or /bin/sh ) then it will work... compare what it does and how...
Bootstrap is great; but we have had some issues with Bootstrapped <tables> (and legacy <fieldset> elements) showing annoying, wayward lines. I solved that problem today with this simple jQuery in the footer:
<script>
$(function(){
$('tr, td, fieldset,... (0 Replies)
Discussion started by: Neo
0 Replies
2. Forum Support Area for Unregistered Users & Account Problems
Hi,
I am trying to create a table through shell scripting . I used a command sqlplus -s to connect to sqlplus and user as sysdba. but there is a problem in it. can anyone please solve this .
#!/bin/bash
$(`sqlplus -s / as sysdba <<eof
create table sample (id,int);
insert into sample... (1 Reply)
Below is my code where i tried using table tag to print out put in table but its not working
#!/bin/ksh
#] && . ./.profile 2>/dev/null
if test -f '.profile'; then . ./.profile; fi;
#. .profile
LOG_DIR=/app/rpx/jobs/scripts/just/logs
sendEmail()
{
pzCType="$1";... (5 Replies)
I have written a shell script that calls below sql file. It is not sending the query data in table in the body of email.
spool table_update.html;
SELECT * FROM PROCESS_LOG_STATS where process = 'ActivateSubscription';
spool off;
exit;
Please use code tags next time for your code and data.... (9 Replies)
My Code is
get_week_date()
{
`sqlplus -s ${DQM_SQL_LOGON}@${DQM_SID} << EOF
SET ECHO OFF
SET FEEDBACK OFF
SET PAGES 0
SET SERVEROUTPUT ON
SET VERIFY OFF
SET TRIMSPOOL ON
(update file_level_qc fq set FQ.DATA_FILE_NAME='Hyvee_Pharmacy_Solutions_201304_v1.txt'... (2 Replies)
Okay. I've been charged with an assignment to create tables.
I "Made" a manufacturing company called "Suit and Tie". I need subdirectories for the company, using three departments: Human resources, Manufacturing, and Sales.
1) mkdir Suit_and_Tie
2) cd Suit_and_Tie
3) mkdir Human... (3 Replies)
Hi there,
im a beginner to the shell scripting.i trying to extract a table from a db(IMD) and i have to get the count of that table and size of the file.
can you help me out how to write the shall scriping for the above query. (2 Replies)
Hi
Can we create a rectangular table as i have attached in the query .
This is primarily for populating the created table with data gathered .
Hope I made myself clear ...
Pls suggest
Thanks (1 Reply)
Hi everyone,
I want to write a function which calculates the space needed between fields, to generate a table with aligned fields, like when you type "ls -l", the operating system generates a table with beautifully aligned fields.
I've got this code so far:
for line in $(cat tmpSearch)... (2 Replies)