I need to take a string (stringA) check it for spaces and replace any spaces found with an equal (=) sign.
This is not working. There are spaces between each component:
$StringA | tr "" ""
The error returned is:
test: Specify a parameter with this command
Can you help? (3 Replies)
Hi,
While I am using "|" to join multiple commands, I am not getting the return code when there is error in one of the commnads.
Eg:
b=`find /path/a*.out | xargs basename`
if ; then
echo "Error"
fi
if there is error while finding the file or getting the basename, the $? is... (6 Replies)
I would like to know what means this error and how to fix it
Command 'rm -f -r "0yfOYy-0008Nq-2j-32233-K"'
failed with return code 1 and error message
Thank you (3 Replies)
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
I am trying to find lines in a text file larger than 3 Gb that start with a given string. My command looks like this:
$ look "string" "/home/patrick/filename.txt"
However, this gives me the following message:
"look: /home/patrick/filename.txt: File too large"
So, I have two... (14 Replies)
I was trying to edit the crontab file for root. I had saved off the existing file for later recovery. When I typed crontab -e to edit, the system returned "413" and the cursor stopped blinking.
Ctrl+c stopped that. I typed, in bash, "EDITOR=vi" (Enter). Then, "export EDITOR" (Enter). Then,... (2 Replies)
How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address
and column 3 contains “cc” e-mail address to include with same email.
Sample input file, email.txt
Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies
LEARN ABOUT SUSE
error
error(n) Tcl Built-In Commands error(n)
__________________________________________________________________________________________________________________________________________________NAME
error - Generate an error
SYNOPSIS
error message ?info? ?code?
_________________________________________________________________DESCRIPTION
Returns a TCL_ERROR code, which causes command interpretation to be unwound. Message is a string that is returned to the application to
indicate what went wrong.
The -errorinfo return option of an interpreter is used to accumulate a stack trace of what was in progress when an error occurred; as
nested commands unwind, the Tcl interpreter adds information to the -errorinfo return option. If the info argument is present, it is used
to initialize the -errorinfo return options and the first increment of unwind information will not be added by the Tcl interpreter. In
other words, the command containing the error command will not appear in the stack trace; in its place will be info. Historically, this
feature had been most useful in conjunction with the catch command: if a caught error cannot be handled successfully, info can be used to
return a stack trace reflecting the original point of occurrence of the error:
catch {...} errMsg
set savedInfo $::errorInfo
...
error $errMsg $savedInfo
When working with Tcl 8.5 or later, the following code should be used instead:
catch {...} errMsg options
...
return -options $options $errMsg
If the code argument is present, then its value is stored in the -errorcode return option. The -errorcode return option is intended to
hold a machine-readable description of the error in cases where such information is available; see the return manual page for information
on the proper format for this option's value.
EXAMPLE
Generate an error if a basic mathematical operation fails:
if {1+2 != 3} {
error "something is very wrong with addition"
}
SEE ALSO
catch(n), return(n)
KEYWORDS
error
Tcl error(n)