Sponsored Content
Full Discussion: Table Scripting
Homework and Emergencies Homework & Coursework Questions Table Scripting Post 302795463 by Catori on Wednesday 17th of April 2013 10:02:40 PM
Old 04-17-2013
Code:
trap "rm~/tmp/* 2> /dev/null; exit" 0 1 2 3
employeefile=~/SuitAndTie/HumanResources/employees
looptest=y
while [ $looptest = y ]
do
   clear
   tput cup 1 4; echo "Corporate Employee Addition"
   tput cup 2 4; echo "====================="
   tput cup 4 4; echo "ID number:" 
   tput cup 5 4; echo "Last Name:"
   tput cup 6 4; echo "First Name:"
   tput cup 7 4; echo "====================="
   tput cup 8 4; echo "Add another? (Y)es or (Q)uit:"
   tput cup 4 18; read idnum
   if [ "$idnum" = "q" ]
      then
         clear;exit
   fi
   tput cup 5 18; read lname
   tput cup 6 18; read fname
   if [ "$lname" > "        " ]
      then
      echo "$idnum:$lname:$fname" >> $employeefile
   fi
   tput cup 8 35; read looptest
   if [ "$looptest" = "q" ]
   then
      clear; exit
fi
done

#
#   # Rethink case
#         echo "$idnum:$lname:$fname" >> $employeefile
#       fi
#      fi
#   tput cup 7 34; read looptest
#   if [ "$looptest" != "Y" -a "looptest" != "y" ]
#   #Rethink case
#   then
#      clear; exit
#   fi
#If cancel operation : clear the values and reset looptest in order to
#stay in the loop
#done

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
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

[bash scripting] Generating a table with aligned fields

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)
Discussion started by: Aveltium
2 Replies

2. Shell Programming and Scripting

Create a table using shell scripting

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)
Discussion started by: ultimatix
1 Replies

3. Shell Programming and Scripting

How to get the file size and count of a table using shell scripting?

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)
Discussion started by: pawanmamidi
2 Replies

4. Shell Programming and Scripting

Table Scripting

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)
Discussion started by: Catori
3 Replies

5. Shell Programming and Scripting

How to update a Oracle table through shell scripting?

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)
Discussion started by: karthick.cho
2 Replies

6. Shell Programming and Scripting

Shell scripting unable to send the sql query data in table in body of email

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)
Discussion started by: Sharanakumar
9 Replies

7. Shell Programming and Scripting

Please help in populating output in table using shell scripting

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)
Discussion started by: ankit.mca.aaidu
5 Replies

8. UNIX for Advanced & Expert Users

How can i populate the record in to table using shell scripting?

LOG_DIR=/app/rpx/jobs/scripts/just/logs sendEmail() { pzCType="$1"; pzTitle="$2"; pzMsg="$3"; pzFrom="$4"; pzTo="$5"; pzFiles="$6"; pzReplyTo="$7" ( echo "From: $pzFrom\nTo: $pzTo\nSubject: $pzTitle${pzReplyTo:+\nReply-To: $pzReplyTo}" ] && echo... (1 Reply)
Discussion started by: ankit.mca.aaidu
1 Replies

9. Forum Support Area for Unregistered Users & Account Problems

Creation of Oracle table through shell scripting

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)
Discussion started by: Unregistered
1 Replies

10. Web Development

Getting Rid of Annoying Bootstrap Table Borders and Wayward Table Lines

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
conjure(1)						      General Commands Manual							conjure(1)

NAME
conjure - interprets and executes scripts written in the Magick Scripting Language (MSL). SYNOPSIS
conjure [options] script.msl OVERVIEW
The conjure program is a member of the ImageMagick(1) suite of tools. Use it to process a Magick Scripting Language (MSL) script. The Mag- ick scripting language (MSL) will primarily benefit those that want to accomplish custom image processing tasks but do not wish to program, or those that do not have access to a Perl interpreter or a compiler. For more information about the conjure command, point your browser to file:///usr/share/doc/packages/ImageMagick/www/conjure.html or http://www.imagemagick.org/script/conjure.php. DESCRIPTION
Image Settings: -monitor monitor progress -quiet suppress all warning messages -regard-warnings pay attention to warning messages -seed value seed a new sequence of pseudo-random numbers -verbose print detailed information about the image Miscellaneous Options: -debug events display copious debugging information -help print program options -log format format of debugging information -list type print a list of supported option arguments -version print version information In additiion, define any key value pairs required by your script. For example, conjure -size 100x100 -color blue -foo bar script.msl SEE ALSO
ImageMagick(1) COPYRIGHT
Copyright (C) 1999-2010 ImageMagick Studio LLC. Additional copyrights and licenses apply to this software, see file:///usr/share/doc/pack- ages/ImageMagick/www/license.html or http://www.imagemagick.org/script/license.php ImageMagick Date: 2009/01/10 01:00:00 conjure(1)
All times are GMT -4. The time now is 07:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy