Sponsored Content
Full Discussion: cat > variable + format
Top Forums Shell Programming and Scripting cat > variable + format Post 302342959 by josegr on Tuesday 11th of August 2009 06:43:04 AM
Old 08-11-2009
Right, I had not realized!. Thanks
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

variable= 'cat file|wc -l' String problems

Hi, does anybody knows about wc -l, how to transform it inot a just number? this script ALWAYS executes the command3!!, However, the value of BMU_RUNNING is 1 case $BMU_RUNNING in *0) command1 ;; *1) command 2;; *)command 3;; esac The... (3 Replies)
Discussion started by: Santiago
3 Replies

2. UNIX for Dummies Questions & Answers

Using a variable inside a file to cat another.

I have a question to do and it's somewhat confusing. It says, and I quote "Create a file called file_1 with three lines of text in it. Create a shell variable called "f_name", assign it the string "file_1". Use the cat command and the variable "f_name" to display the contents of the file... (3 Replies)
Discussion started by: MaestroRage
3 Replies

3. Shell Programming and Scripting

redirect cat to variable

hello just i saw a really strange for cat i have file (file1) contains line /home/rajiv/proj1/*.txt now applied a commonds DDPATH="$(cat file1)" echo $DDPATH it shows all the txt files in that folder like /home/rajiv/proj1/read1.txt /home/rajiv/proj1/read2.txt... (7 Replies)
Discussion started by: shailesh_arya
7 Replies

4. Shell Programming and Scripting

Split variable length and variable format CSV file

Dear all, I have basic knowledge of Unix script and her I am trying to process variable length and variable format CSV file. The file length will depend on the numbers of Earnings/Deductions/Direct Deposits. And The format will depend on whether it is Earnings/Deductions or Direct Deposits... (2 Replies)
Discussion started by: chechun
2 Replies

5. Shell Programming and Scripting

script help Undefined /illegal variable using cat

Hello group, Still fairly new at the whole scripting thing so be gentle. I'm trying to write a simple script that archives my log files into a master log broken into weeks of the year. My script runs fine up till the "cat" lines which I get a undefined or illegal variable name error. But... (2 Replies)
Discussion started by: dpreviti
2 Replies

6. UNIX for Dummies Questions & Answers

format values in a text file using cat command

Hello... Is it possible that we can change the format of the values we entered in a text file using cat? Like for example, I will create a text file names.txt using cat and as I save the names and view the text file... the format will be like this ... (5 Replies)
Discussion started by: kpopfreakghecky
5 Replies

7. Shell Programming and Scripting

cat file with variable substitution

MyFile contains: ALTER TABLE $DBN.$TBN ADD $COL $TYP COMPRESS ($VAL); I need to cat the file and have it substitute all of the variables with their contents. cat MyFile does not work. The following works for the first line, but errors on the second line because of the paren: $ while read... (2 Replies)
Discussion started by: Phil27577
2 Replies

8. Shell Programming and Scripting

Moving cat values to a variable

I have a file created as ABC!DEF@2014.txt My if condition is based on 2014 so I need to move it to variable. So while I can do this on console screen - ls ABC* -l > test.txt cat test.txt | cut -f 2 -d "@" | cut -f 1 -d "." to get the value - 2014 I am a bit at loss how to achieve this... (4 Replies)
Discussion started by: rajiv_kool
4 Replies

9. UNIX for Beginners Questions & Answers

Carriage return with cat variable

Hi, I wish to know how to works the carriage return with cat.. As a picture often speaks better than words, my code below : #te=`cat text.txt` (I tried this, but the same..) te=$(cat text.txt) echo $te My file text.txt below: BLABLABLABLABLALBLA BLABLABLABLABLALBLA ... (9 Replies)
Discussion started by: Arnaudh78
9 Replies

10. Shell Programming and Scripting

Bash - Trying to cat a file that is a variable

Thank you in advance for looking at this, I've scoured the internet and can't find the answer I'm looking for!! - I am new at bash script so please bare with me!! I have a script where I've identified individual files within a folder, the filename is then stored as a variable ($filename):... (3 Replies)
Discussion started by: paperbackwriter
3 Replies
XtGrabKey(3)							   XT FUNCTIONS 						      XtGrabKey(3)

NAME
XtGrabKey, XtUngrabKey, XtGrabKeyboard, XtUngrabKeyboard, XtGrabButton, XtUngrabButton, XtGrabPointer, XtUngrabPointer - manage grabs SYNTAX
void XtGrabKey(Widget widget, KeyCode keycode, Modifiers modifiers, Boolean owner_events, int pointer_mode, int keyboard_mode); void XtUngrabKey(Widget widget, KeyCode keycode, Modifiers modifiers); int XtGrabKeyboard(Widget widget, Boolean owner_events, int pointer_mode, int keyboard_mode, Time time); void XtUngrabKeyboard(Widget widget, Time time); void XtGrabButton(Widget widget, int button, Modifiers modifiers, Boolean owner_events, unsigned int event_mask, int pointer_mode, int key- board_mode, Window confine_to, Cursor cursor); void XtUngrabButton(Widget widget, KeyCode button, Modifiers modifiers); int XtGrabPointer(Widget widget, Boolean owner_events, unsigned int event_mask, int pointer_mode, int keyboard_mode, Window confine_to, Cursor cursor, Time time); void XtUngrabPointer(Widget widget, Time time); ARGUMENTS
widget Specifies the widget in whose window the grab will occur. Must be of class Core or a subclass thereof. keycode modifiers owner_events pointer_mode keyboard_mode time button confine_to cursor Specifies arguments to the associated Xlib function call. DESCRIPTION
XtGrabKey calls XGrabKey specifying the widget's window as the grab window if the widget is realized. The remaining arguments are exactly as for XGrabKey. If the widget is not realized, or is later unrealized, the call to XGrabKey will be performed (again) when the widget is realized and its window becomes mapped. In the future, if XtDispatchEvent is called with a KeyPress event matching the specified keycode and modifiers (which may be AnyKey or AnyModifier, respectively) for the widget's window, the Intrinsics will call XtUngrabKeyboard with the timestamp from the KeyPress event if either of the following conditions is true: o There is a modal cascade and the widget is not in the active subset of the cascade and the keyboard was not previously grabbed, or o XFilterEvent returns True. XtUngrabKey calls XUngrabKey specifying the widget's window as the ungrab window if the widget is realized. The remaining arguments are exactly as for XUngrabKey. If the widget is not realized, XtUngrabKey removes a deferred XtGrabKey request, if any, for the specified wid- get, keycode, and modifiers. If the specified widget is realized XtGrabKeyboard calls XGrabKeyboard specifying the widget's window as the grab window. The remaining arguments and return value are exactly as for XGrabKeyboard. If the widget is not realized, XtGrabKeyboard immediately returns Grab- NotViewable. No future ungrab is implied by XtGrabKeyboard. XtUngrabKeyboard calls XUngrabKeyboard with the specified time. XtGrabButton calls XGrabButton specifying the widget's window as the grab window if the widget is realized. The remaining arguments are exactly as for XGrabButton. If the widget is not realized, or is later unrealized, the call to XGrabButton will be performed (again) when the widget is realized and its window becomes mapped. In the future, if XtDispatchEvent is called with a ButtonPress event matching the specified button and modifiers (which may be AnyButton or AnyModifier, respectively) for the widget's window, the Intrinsics will call XtUngrabPointer with the timestamp from the ButtonPress event if either of the following conditions is true: o There is a modal cascade and the widget is not in the active subset of the cascade and the pointer was not previously grabbed, or o XFilterEvent returns True. XtUngrabButton calls XUngrabButton specifying the widget's window as the ungrab window if the widget is realized. The remaining arguments are exactly as for XUngrabButton. If the widget is not realized, XtUngrabButton removes a deferred XtGrabButton request, if any, for the specified widget, button, and modifiers. XtGrabPointer calls XGrabPointer specifying the widget's window as the grab window. The remaining arguments and return value are exactly as for XGrabPointer. If the widget is not realized, XtGrabPointer immediately returns GrabNotViewable. No future ungrab is implied by XtGrabPointer. XtUngrabPointer calls XUngrabPointer with the specified time. SEE ALSO
X Toolkit Intrinsics - C Language Interface Xlib - C Language X Interface X Version 11 libXt 1.1.3 XtGrabKey(3)
All times are GMT -4. The time now is 10:56 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy