Sponsored Content
Top Forums Shell Programming and Scripting Help edit simple payroll script? Post 302200715 by danmero on Thursday 29th of May 2008 11:24:14 PM
Old 05-30-2008
Tested Smilie
Code:
#!/bin/sh
test $1 -gt 40 && echo $(( $1 % 40 * 15 + 40 * 10 )) || echo $(( $1 * 10 ))


Last edited by danmero; 05-30-2008 at 02:53 AM.. Reason: Make life complicated
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

simple file edit

What command can I use to simply edit a file by searching for a word and then deleting the lines that I find that word in? (4 Replies)
Discussion started by: capesong
4 Replies

2. Shell Programming and Scripting

Simple SED edit

I have output like the following: B D 20070116095820001 N D S0000579.LOG S0000582.LOG B D 20070116095750001 N D S0000574.LOG S0000576.LOG B D 20070116095734001 N D S0000570.LOG S0000573.LOG B D 20070116095705001 N D S0000569.LOG S0000569.LOG B D ... (5 Replies)
Discussion started by: rdudejr
5 Replies

3. Shell Programming and Scripting

How to EDIT file using VI in a script

Hello, How would i go about editing a file using VI within a shell script please? Basically, i want to open a file, clear it's contents and save the file. I found this on the web using "ex" but can't seem to get it to work: ex /home/oconnor/TOOLS/UNIXCMDS/test_ex <<eof_ex dd /*i put... (2 Replies)
Discussion started by: bobk544
2 Replies

4. Shell Programming and Scripting

HP-ux: Script edit

Hallo Friends, I have written a script which goes through different directories deleting files but I think there is a shorter way I can do this please help. #!/bin/ksh #set -x cd /minotaur/Data/CFD_Input/E_CIF cd 051 for files in 2008* do rm -rf $file done # cd ../052 for... (3 Replies)
Discussion started by: kekanap
3 Replies

5. Shell Programming and Scripting

Need help in a shell script to edit a tablespace creation script.

Hi, CREATE TABLESPACE aps_blob_large01 DATAFILE '/c2r6u13/u03/oradata/qnoldv01/aps_blob_large0101.dbf' SIZE X 270532608 REUSE DEFAULT STORAGE (INITIAL 134217728 NEXT... (2 Replies)
Discussion started by: rparavastu
2 Replies

6. Shell Programming and Scripting

Script to make simple recurring ascii file edit

Hi, I have an ascii file with recurring lines (the file is 36mb so lots of lines) which look like this: -2.5 -66.324-68.138 935.2 1.953 -0.664 272.617 73.684 -2.428 269.998 0.000 Every 14 lines there is a blank line. I would like to, for each non-blank line,... (2 Replies)
Discussion started by: blueade7
2 Replies

7. Shell Programming and Scripting

Help making simple perl or bash script to create a simple matrix

Hello all! This is my first post and I'm very new to programming. I would like help creating a simple perl or bash script that I will be using in my work as a junior bioinformatician. Essentially, I would like to take a tab-delimted or .csv text with 3 columns and write them to a "3D" matrix: ... (16 Replies)
Discussion started by: torchij
16 Replies

8. UNIX for Advanced & Expert Users

File edit script exceptions how to pass to script

i wrote script for if file exists script do file edit problem with the script get stuck not existing as for exit i mentioned exit 0 , and how to give the exception for script it should add ./script -- add hi ./script --add "hi how are you" now below script with case it is working for... (0 Replies)
Discussion started by: markjohn1
0 Replies
DwtSTextGetEditable(3Dwt)												 DwtSTextGetEditable(3Dwt)

Name
       DwtSTextGetEditable - Obtains the current edit permission state indicating whether the user can edit the text in the simple text widget.

Syntax
       Boolean DwtSTextGetEditable(widget)
	    Widget widget;

Arguments
       widget	 Specifies the ID of the simple text widget whose edit permission state you want to obtain.

Description
       The  DwtSTextGetEditable function returns the current edit-permission-state, which indicates whether the user can edit the text in the sim-
       ple text widget.  If the function returns True, the user can edit the string text in the simple text widget.  If it returns False, the user
       cannot edit the text.

Return Values
       This function returns the current permission state concerning the editing of the text field in the widget.

See Also
       DwtSText(3Dwt),  DwtSTextGetString(3Dwt),  DwtSTextSetEditable(3Dwt), DwtSTextGetMaxLength(3Dwt), DwtSTextSetMaxLength(3Dwt), DwtS-
       TextSetSelection(3Dwt), DwtSTextClearSelection(3Dwt), DwtSTextGetSelection(3Dwt)
       Guide to the XUI Toolkit: C Language Binding
       Guide to the XUI Toolkit Intrinsics: C Language Binding

															 DwtSTextGetEditable(3Dwt)
All times are GMT -4. The time now is 01:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy