Sponsored Content
Full Discussion: remove dash
Top Forums Shell Programming and Scripting remove dash Post 302280132 by melanie_pfefer on Monday 26th of January 2009 05:02:35 AM
Old 01-26-2009
remove dash

hi

I am using ksh

#A="abc-def"
#typeset -u B="$A"
#echo $B
ABC-DEF

how to remove the dash?
i.e.
ABCDEF?

thank you
 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

How to remove a file with a leading dash '-' in it's name?

Somehow someone created a file named '-ov' in the root directory. Given the name, the how was probably the result of some cpio command they bozo'ed. I've tried a number of different ways to get rid of it using * and ? wildcards, '\' escape patterns etc.. They all fail with " illegal option --... (3 Replies)
Discussion started by: GSalisbury
3 Replies

2. Shell Programming and Scripting

double-dash options

I need to create a file that accepts arguments and options, and the options have to allow for single-dash options (-abc) and double-dash options (--help). What is the best way to do this? Getopt(s) is great for single-dash, but chokes on double-dash. Do I really need to save the arguments to a... (1 Reply)
Discussion started by: dhinge
1 Replies

3. UNIX for Dummies Questions & Answers

dash after ampersant

Hi! I'm new in these forums and more or less new with Unix. So... here is the question: does anyone know where is redirected the output of a command when you put >&- after it? Does it means any standard file descriptor? Thanks! (2 Replies)
Discussion started by: csecnarf
2 Replies

4. UNIX for Dummies Questions & Answers

ignoring a dash in file name

so i have a simple file called -x and i need it renamed to x now i dont understand why when using the most basic methods, only the code mv ./-x x changes the file name while using any other type of escape characters around the dash, such as single/double quotations or backslash, doesnt. ... (5 Replies)
Discussion started by: LumpSum
5 Replies

5. Shell Programming and Scripting

How to concatenate string containing a leading dash?

Is there a way to concatenate two strings, where the first string is "-n" and there is a space between the "-n" and the second string? Below are some examples of what I tried. #!/bin/sh var1=test #working without dashes: var2="n $var1" echo $var2 var2=n" "$var1 echo $var2 var2="n... (5 Replies)
Discussion started by: wolfv
5 Replies

6. UNIX for Advanced & Expert Users

Exclude dash (-) from word separators in vi

vi uses dash and space as word separators. is there any way to exclude dash from word separators ? This is required to work with the symbols generated by ctags exe. when symbol contain a "-" ,vi tags fails to locate that even though symbol is generated properly. For example Symbol -... (3 Replies)
Discussion started by: cabhi
3 Replies

7. Shell Programming and Scripting

Exclude dash in grep

Hi, I must be overlooking something, but I don't understand why this doesn't work. I'm trying to grep on a date, excluding all the lines starting with a dash: testfile: #2013-12-31 2013-12-31code: grep '^2013-12-31' testfileI'm expecting to see just the second line '2013-12-31' but I don't... (3 Replies)
Discussion started by: Subbeh
3 Replies

8. OS X (Apple)

'time' does NOT work on a function in 'dash'.

Hi guys and gals... I am writing a piece of code that is dash compliant and came across this error. I have put it in the OSX section as that is what I am using. I have no idea what the 'dash' version is but was installed about 6 months ago. MBP, OSX 10.12.6, default terminal running dash on... (4 Replies)
Discussion started by: wisecracker
4 Replies

9. Shell Programming and Scripting

A dash to GOTO or a dash from GOTO, that is the question...

Well, guys I saw a question about GOTO for Python. So this gave me the inspiration to attempt a GOTO function for 'dash', (bash and ksh too). Machine: MBP OSX 10.14.3, default bash terminal, calling '#!/usr/local/bin/dash'... This is purely a fun project to see if it is possible in PURE... (3 Replies)
Discussion started by: wisecracker
3 Replies
Tk_GetDash(3)						       Tk Library Procedures						     Tk_GetDash(3)

__________________________________________________________________________________________________________________________________________________

NAME
Tk_GetDash - convert from string to valid dash structure. SYNOPSIS
#include <tk.h> int Tk_GetDash(interp, string, dashPtr) ARGUMENTS
Tcl_Interp *interp (in) Interpreter to use for error reporting. const char * string (in) Textual value to be converted. Tk_Dash *dashPtr (out) Points to place to store the dash pattern value converted from string. _________________________________________________________________ DESCRIPTION
These procedure parses the string and fills in the result in the Tk_Dash structure. The string can be a list of integers or a character string containing only ".,-_" or spaces. If all goes well, TCL_OK is returned. If string does not have the proper syntax then TCL_ERROR is returned, an error message is left in the interpreter's result, and nothing is stored at *dashPtr. The first possible syntax is a list of integers. Each element represents the number of pixels of a line segment. Only the odd segments are drawn using the "outline" color. The other segments are drawn transparent. The second possible syntax is a character list containing only 5 possible characters ".,-_ ". The space can be used to enlarge the space between other line elements, and can not occur as the first position in the string. Some examples: -dash . = -dash {2 4} -dash - = -dash {6 4} -dash -. = -dash {6 4 2 4} -dash -.. = -dash {6 4 2 4 2 4} -dash {. } = -dash {2 8} -dash , = -dash {4 4} The main difference of this syntax with the previous is that it is shape-conserving. This means that all values in the dash list will be multiplied by the line width before display. This assures that "." will always be displayed as a dot and "-" always as a dash regardless of the line width. On systems where only a limited set of dash patterns, the dash pattern will be displayed as the most close dash pattern that is available. For example, on Windows only the first 4 of the above examples are available. The last 2 examples will be displayed identically as the first one. KEYWORDS
dash, conversion Tk 8.3 Tk_GetDash(3)
All times are GMT -4. The time now is 09:20 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy