Sponsored Content
Full Discussion: Script reading needed
Top Forums UNIX for Dummies Questions & Answers Script reading needed Post 302848207 by jefferj54 on Wednesday 28th of August 2013 06:27:41 PM
Old 08-28-2013
Re:Re: Script Reading Needed

Thanks so much. Okay.

Line 1 - good morning.
Line 2 - Enter option 1 to add.
Line 3 - option q to quit.
Line 4 - "while (loop) - Whatever is entered is not equal to q or quit.
Line 5 - do (part of while loop) - read "Enter" ? (not sure)
Line 6 - "case" - Whatever is entered, is input?? (also not sure)

The rest I understand. The punch line is that sum=$((num1 + num2)) will perform the general addition.
And the sum, sum= echo "$sum" will be sent to standard output.

esac completes "case."
done completes "while" loop.

Hope I'm close.

Thanks again,
joe.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Reading Input in a Script

#!/usr/bin/sh echo "Enter reason:" echo "> \c" read $reason $reason >> access.log This doesnt work for me. Can someone tell me how I would read the input from what the person types, and then append that to the log file? Regards (2 Replies)
Discussion started by: alwayslearningunix
2 Replies

2. Programming

Reading a file into a C++ script

Hi, I'm trying to read a file in with and assigne the stream to a char * type. I've manged it using the cin.get returning type char, but am having run-time problems returning a char *. For example, char *pStream = "file.txt"; ifstream from(pStream); from.open(pStream); ... (1 Reply)
Discussion started by: Breen
1 Replies

3. UNIX for Dummies Questions & Answers

script to reading a file

hi, I have a file containing names, say n number of names, sample file robin smith dallas frey cook all these names are in a file name called names.txt and it is placed in a directory called /data/names all i want is to write a script, which will read from the file and gives the... (3 Replies)
Discussion started by: vasikaran
3 Replies

4. Shell Programming and Scripting

URGENT HELP NEEDED ON -File size reading

All Expert, I am using Sun OS 5.8 and Perl version 5 in One server and Perl 5.8 in another unix server. I am able to read a file using fopen function of perl --file size having more then 3 GB of data.(In the machine where Perl 5.8 install) But when i am running the same perl script --It... (1 Reply)
Discussion started by: jambesh
1 Replies

5. Shell Programming and Scripting

Script help needed

I have a code given below... ERROR=`grep "Job Status" ${LOG_FILE}` ERROR=${ERROR##*\(} ERROR=${ERROR%%\)*} if then echo "The job completed successfully" EXIT_STATUS=0 else echo "The job failed" EXIT_STATUS=1 fi can anybody tell me what is ERROR=${ERROR##*\(}... (1 Reply)
Discussion started by: Sagarddd
1 Replies

6. Shell Programming and Scripting

script for reading logs of a script running on other UNIX server

Hi, I have a script, running on some outside firwall server and it's log of success or failure is maintained in a file. I want to write a script which ftp that server and reads that file and checks the logs and if failure , I will send mail notification. Please let meknow if I am not... (1 Reply)
Discussion started by: vandana.parwani
1 Replies

7. Shell Programming and Scripting

Script needed...

Hi! I have a file which has a list of host, I want to ssh to each of the first box for an app and grep through the logs for version of the application and look for a certain string "Connection is open" in the log file. The file I am referring to looks like this - ... (1 Reply)
Discussion started by: jacki
1 Replies

8. Shell Programming and Scripting

Expect script help needed- script failing if router unavailable

Hey all. Sometimes I'm tasked to change some router configs for the entire network (over 3,000 Cisco routers). Most of the time its a global config parameter so its done with a loop and an IP list as its the same configuration change for all routers. This is working OK. However, sometimes an... (3 Replies)
Discussion started by: mrkz1974
3 Replies

9. Shell Programming and Scripting

Help needed reading the file

I am reading a pipe delimted file having the 4 columns. The file content looks like APT|string|Application ID For App|value for env in `cat $ConfigFile` do name=`echo $env | cut -d '|' -f1` type=`echo $env | cut -d '|' -f2 prompt=`echo $env | cut -d '|' -f3` ... (5 Replies)
Discussion started by: chandu123
5 Replies

10. Shell Programming and Scripting

Help needed in reading line value into variable

I have a file which has data in 8 lines: 10 34 6 1 4 46 67 31 I am trying to read each value into each different variable so that I use these variables in preparing my report. Another option is to dynamically print each line values in the report like below: users with privA:... (2 Replies)
Discussion started by: sarat949
2 Replies
ipentry(n)						    An IP address entry widget							ipentry(n)

__________________________________________________________________________________________________________________________________________________

NAME
ipentry - An IP address entry widget SYNOPSIS
package require Tcl 8.4 package require Tk 8.4 package require ipentry ?0.3? ::ipentry::ipentry pathName ?option value...? ::ipentry::ipentry6 pathName ?option value...? pathName complete pathName get pathName insert iplist pathName icursor index pathName configure option value... pathName cget option _________________________________________________________________ DESCRIPTION
This package provides a widget for the entering of a IP address. ::ipentry::ipentry pathName ?option value...? Creates a new IPv4 ipentry widget and configures it with the given options and their values. ::ipentry::ipentry6 pathName ?option value...? Creates a new ipentry widget for the entry of an IPv6 address. All options are the same as the IPv4 widget. Each widget created with the command above supports the following methods: pathName complete Returns a boolean value. True indicates that the entry contains a complete IP address, meaning all fields have a value. In some cases IPv6 address are valid when fields are missing. You will need to do your own validation to detect this. pathName get Returns the contents of the entry as a list consisting of 4 or 8 elements. pathName insert iplist IPv4 Takes a list of 4 elements and inserts one into each quad of the entry, in order. All values in the list must be empty or integers. Values outside the range 0 to 255 are modified to be within the range. IPv6 Takes a list of 8 elements and inserts one into each quad of the entry, in order. All values in the list must be empty or 1 to 4 hex digits. pathName icursor index Sets the position of the widgets insertion cursor. Only integer values between 0 and 15 are valid for ipentry and 0 to 31 for ipen- try6. Setting the icursor will only have an effect if the widget already has the input focus. pathName configure option value... Modifies the configuration of the widget. For options and their meaning see the widget options section. pathName cget option Returns information about the current configuration of the widget, for the specified option. For options and their meaning see the widget options section. WIDGET OPTIONS
Command-Line Switch: -textvariable Database Name: textvariable Database Class: Variable The name of a variable which holds the value of the IP address. The value must be a string of the form NNN.NNN.NNN.NNN for IPv4 or HHHH:HHHH:HHHH:HHHH:HHHH:HHHH:HHHH:HHHH for IPv6 where H is a hex digit. The variable will be modified to represent a valid IP address if it is not already. Command-Line Switch: -state Database Name: state Database Class: State Specifies one of three states for the entry: normal, disabled, or readonly. Command-Line Switch: -font Database Name: font Database Class: Font Command-Line Switch: -bd Database Name: borderWidth Database Class: BorderWidth Command-Line Switch: -fg Database Name: foreground Database Class: Foreground Command-Line Switch: -bg Database Name: background Database Class: Background Command-Line Switch: -relief Database Name: relief Database Class: Relief Command-Line Switch: -highlightthickness Database Name: highlightThickness Database Class: HighlightThickness Command-Line Switch: -highlightcolor Database Name: highlightColor Database Class: HighlightColor Command-Line Switch: -highlightbackground Database Name: highlightBackground Database Class: HighlightBackground Command-Line Switch: -selectbackground Database Name: selectBackground Database Class: Background Command-Line Switch: -selectforeground Database Name: selectForeground Database Class: Foreground Command-Line Switch: -selectborderwidth Database Name: selectBorderWidth Database Class: BorderWidth Command-Line Switch: -disabledbackground Database Name: disabledBackground Database Class: DisabledBackground Command-Line Switch: -disabledforeground Database Name: disabledForeground Database Class: DisabledForeground Command-Line Switch: -readonlybackground Database Name: readonlyBackground Database Class: ReadonlyBackground Command-Line Switch: -insertbackground Database Name: insertBackground Database Class: Background Standard widget options. See options for a description of their meanings and values. KEYWORDS
entry, ip address ipentry 0.3 ipentry(n)
All times are GMT -4. The time now is 03:36 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy