06-02-2009
@ vidyadhar85
Could you please give me the command line to do this change from left justify to right justify. Tnx.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Using sed or awk, I need to display text between two words/characters. Below are two example inputs and the desired output. In a nutshell, I need the date-range value between the quotes (but only the first occurance of date-range as there can be more than one).
Example One Input:
xml-report... (1 Reply)
Discussion started by: cmichaelson
1 Replies
2. Shell Programming and Scripting
I have a requirement where i have to read from a .sh file a text lying bet characters like 'SELECT' & ';'...Please help me out in this. I am new to shell scripting. (2 Replies)
Discussion started by: goutam_igate
2 Replies
3. Shell Programming and Scripting
ok, so i have the following text to replace but it's not working. can someone please help me out:
:%s~awk '// {split($2,s,",");a=$1 FS s} /-/ {b=a} END{print b}'~tail -1~g
I want to replace the entire awk command with tail -1.
thanks (7 Replies)
Discussion started by: SkySmart
7 Replies
4. UNIX for Dummies Questions & Answers
I have a text file that looks like this:
I want to delete the last character of first column in all rows so that my output looks like this:
Thanks a lot! (1 Reply)
Discussion started by: evelibertine
1 Replies
5. Shell Programming and Scripting
I have a file which looks like this. I only show first 11 lines of the file followed by some text that appears at the end of every file.
1. file:///path1/path2/path3/path4/251192.dat (score 3.849384, docid 142923)
2. file:///path1/path2/path3/path4/173859.dat (score 3.831033, docid 75365)
3.... (4 Replies)
Discussion started by: shoaibjameel123
4 Replies
6. Shell Programming and Scripting
I have a file where the text might exceed 80 characters. I want to have the maximum text lengths to be 80, and cut text from a space.
I written an awk script below but does not seem to work very well
{
gsub("\t"," ")
$0 = line $0
while (length <= WIDTH) {
line = $0
... (3 Replies)
Discussion started by: kristinu
3 Replies
7. UNIX for Dummies Questions & Answers
When I use vi to see what's in the file I get this:
int add1(int x) {^M return x + 1;^M}
^Mint subtract1(int x) {^M return x - 1;^M}
^Mint double_it(int x) {^M return x * 2;^M}
^Mint halve_it(int x) {^Mreturn x / 2;^M}
^Mint main() {^M int myint;^M int result;^M ... (2 Replies)
Discussion started by: Nonito84
2 Replies
8. Shell Programming and Scripting
Guys,
I know that the below command will cut the 13th field from test.txt file
awk -F"|" '{print $13}' test.txt
The answer would be,
CA
CN
Ohio
If we see the 3 rd one, it has more than 2 characters. So i wanted to check this in if condition and i want to get the output if the 13th... (4 Replies)
Discussion started by: AraR87
4 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I have a large text file with the following format:
>gi|347545744|gb|JN204951.1| Dismorphia spio voucher 5
ATCAAATTCCTTCCTCTCCTTAAA
>gi|17544664774|gb|WN204922.32| Rodapara nigens gene region
CCGGGCAAATTCCTTCCTCTCCTTAAA
>gi|555466400|gb|SG255122.8| Bombyx mandariana genbank 3... (1 Reply)
Discussion started by: euspilapteryx
1 Replies
10. Shell Programming and Scripting
Hi,
I have a "|" delimited file that is exported from a database.
There is one column in the file which has description/comments entered by some application user. It has "Control-M" character and "New Line" character in between the text.
Hence, when i export the data, this record with the new... (4 Replies)
Discussion started by: tarun.trehan
4 Replies
LEARN ABOUT REDHAT
tk_getjustify
Tk_GetJustifyFromObj(3) Tk Library Procedures Tk_GetJustifyFromObj(3)
__________________________________________________________________________________________________________________________________________________
NAME
Tk_GetJustifyFromObj, Tk_GetJustify, Tk_NameOfJustify - translate between strings and justification styles
SYNOPSIS
#include <tk.h>
int
Tk_GetJustifyFromObj(interp, objPtr, justifyPtr)
int
Tk_GetJustify(interp, string, justifyPtr)
const char *
Tk_NameOfJustify(justify)
ARGUMENTS
Tcl_Interp *interp (in) Interpreter to use for error reporting, or NULL.
Tcl_Obj *objPtr (in/out) String value contains name of justification style, one of "left", "right", or "center". The internal
rep will be modified to cache corresponding justify value.
const char *string (in) Same as objPtr except description of justification style is passed as a string.
int *justifyPtr (out) Pointer to location in which to store justify value corresponding to objPtr or string.
Tk_Justify justify (in) Justification style (one of the values listed below).
_________________________________________________________________
DESCRIPTION
Tk_GetJustifyFromObj places in *justifyPtr the justify value corresponding to objPtr's value. This value will be one of the following:
TK_JUSTIFY_LEFT
Means that the text on each line should start at the left edge of the line; as a result, the right edges of lines may be ragged.
TK_JUSTIFY_RIGHT
Means that the text on each line should end at the right edge of the line; as a result, the left edges of lines may be ragged.
TK_JUSTIFY_CENTER
Means that the text on each line should be centered; as a result, both the left and right edges of lines may be ragged.
Under normal circumstances the return value is TCL_OK and interp is unused. If objPtr does not contain a valid justification style or an
abbreviation of one of these names, TCL_ERROR is returned, *justifyPtr is unmodified, and an error message is stored in interp's result if
interp is not NULL. Tk_GetJustifyFromObj caches information about the return value in objPtr, which speeds up future calls to Tk_GetJusti-
fyFromObj with the same objPtr.
Tk_GetJustify is identical to Tk_GetJustifyFromObj except that the description of the justification is specified with a string instead of
an object. This prevents Tk_GetJustify from caching the return value, so Tk_GetJustify is less efficient than Tk_GetJustifyFromObj.
Tk_NameOfJustify is the logical inverse of Tk_GetJustify. Given a justify value it returns a statically-allocated string corresponding to
justify. If justify is not a legal justify value, then "unknown justification style" is returned.
KEYWORDS
center, fill, justification, string
Tk 8.1 Tk_GetJustifyFromObj(3)