Sponsored Content
Top Forums Shell Programming and Scripting how to read argument with $ value in the word Post 302555986 by duddukuri on Friday 16th of September 2011 09:10:53 AM
Old 09-16-2011
what is the character to nullify the '$"
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to read each word in a file

Hi, I want to read each word in a file. start at a particular character say '%' and read till another character say ')' (these two characters form the part of my file). then i want to delete the whole sentence(that is between '%' and ')' ) and keep the remaining file intact. Its urgent... (1 Reply)
Discussion started by: kaps_jhaver
1 Replies

2. UNIX for Dummies Questions & Answers

Read last word of file name

Hi I am writing a script that needs to read all file from a directory and print only last word of all file names. My script: for file in /documents/files/ do $shortFile=$(file##.*) echo $shortFile done All my file names in /document/files/ directory are like unix_ubuntu but I need to... (1 Reply)
Discussion started by: watsup
1 Replies

3. Shell Programming and Scripting

To read data word by word from given file & storing in variables

File having data in following format : file name : file.txt -------------------- 111111;name1 222222;name2 333333;name3 I want to read this file so that I can split these into two paramaters i.e. 111111 & name1 into two different variables(say value1 & value2). i.e val1=11111 &... (2 Replies)
Discussion started by: sjoshi98
2 Replies

4. Shell Programming and Scripting

Read last word of nth line

Hi people; i want to read the last word of the 14th line of my file1.txt. Here is the EXACT 14th line of the file. 250 SectorPortnum=3,AuxPortInUngo=2,PortDeviceGroup=1,PortDeviceSet=1,PorDevice=1 20 >>> Set. i have to get the word Set. how can i call it and also how... (3 Replies)
Discussion started by: gc_sw
3 Replies

5. Shell Programming and Scripting

Read env variables from argument file

Hi, I have a generic shell script (runBatchJob.sh) to read files (batchJob) with commands in them and execute the commands by reading the batchJob file as below ./runBatchJob.sh batchJob batchJob file $BATCHDIR/execute_procedure.sh $DATADIR/collectData.sh $OTHER_ENV_VAR/doSomething.sh ... (10 Replies)
Discussion started by: bOngY
10 Replies

6. Shell Programming and Scripting

Read last word of the line.

Hi, I need a script to read last word of the line and out put in some temp file. i it can contain any word like: My name is Harry. or My zip code is 24490 or it can be My secret code is 024H I just need last word of the line (Harry, or 2440 or 024H) Thanks for the posts below.... (10 Replies)
Discussion started by: HarryReid
10 Replies

7. Shell Programming and Scripting

Read a File line by line and split into array word by word

Hi All, Hope you guys had a wonderful weekend I have a scenario where in which I have to read a file line by line and check for few words before redirecting to a file I have searched the forum but,either those answers dint work (perhaps because of my wrong under standing of how IFS... (6 Replies)
Discussion started by: Kingcobra
6 Replies

8. Programming

C Code to read a word from file

Hello All, I have to write a C Code to read a word from file and Keep track of the number of word occurrence in each line and total in the file. Maintaining total count is easier but maintaining per line count is what I am struggling to achieve. I thought of maintaining linked list... (3 Replies)
Discussion started by: anand.shah
3 Replies

9. Shell Programming and Scripting

Read contains within { and replace the word

Hello Team, I am looking for help to read contains from { } and replace the word. basically, I need to use this for nagios configuration file where each host/service define within {}. I want script or syntax to which read first word/line from {} and replace the desire word within that {}. ... (5 Replies)
Discussion started by: ghpradeep
5 Replies

10. How to Post in the The UNIX and Linux Forums

Read a json file passed as cmd line argument

usage: myscript.sh config.json config.json: { "HOST":"abc", "DB_NM":"xyz", "USR_NM":"asd", "PWD":"xxx", ......... ......... ......... ........ } myscript.sh: (2 Replies)
Discussion started by: RGRT
2 Replies
QSqlForm(3qt)															     QSqlForm(3qt)

NAME
QSqlForm - Creates and manages data entry forms tied to SQL databases SYNOPSIS
#include <qsqlform.h> Inherits QObject. Public Members QSqlForm ( QObject * parent = 0, const char * name = 0 ) ~QSqlForm () virtual void insert ( QWidget * widget, const QString & field ) virtual void remove ( const QString & field ) uint count () const QWidget * widget ( uint i ) const QSqlField * widgetToField ( QWidget * widget ) const QWidget * fieldToWidget ( QSqlField * field ) const void installPropertyMap ( QSqlPropertyMap * pmap ) virtual void setRecord ( QSqlRecord * buf ) Public Slots virtual void readField ( QWidget * widget ) virtual void writeField ( QWidget * widget ) virtual void readFields () virtual void writeFields () virtual void clear () virtual void clearValues ( bool nullify = FALSE ) Protected Members virtual void insert ( QWidget * widget, QSqlField * field ) virtual void remove ( QWidget * widget ) DESCRIPTION
The QSqlForm class creates and manages data entry forms tied to SQL databases. Typical use of a QSqlForm consists of the following steps: Create the widgets you want to appear in the form. Create a cursor and navigate to the record to be edited. Create the QSqlForm. Set the form's record buffer to the cursor's update buffer. Insert each widget and the field it is to edit into the form. Use readFields() to update the editor widgets with values from the database's fields. Display the form and let the user edit values etc. Use writeFields() to update the database's field values with the values in the editor widgets. Note that a QSqlForm does not access the database directly, but most often via QSqlFields which are part of a QSqlCursor. A QSqlCursor::insert(), QSqlCursor::update() or QSqlCursor::del() call is needed to actually write values to the database. Some sample code to initialize a form successfully: QLineEdit myEditor( this ); QSqlForm myForm( this ); QSqlCursor myCursor( "mytable" ); // Execute a query to make the cursor valid myCursor.select(); // Move the cursor to a valid record (the first record) myCursor.next(); // Set the form's record pointer to the cursor's edit buffer (which // contains the current record's values) myForm.setRecord( myCursor.primeUpdate() ); // Insert a field into the form that uses myEditor to edit the // field 'somefield' in 'mytable' myForm.insert( &myEditor, "somefield" ); // Update myEditor with the value from the mapped database field myForm.readFields(); ... // Let the user edit the form ... // Update the database myForm.writeFields(); // Update the cursor's edit buffer from the form myCursor.update(); // Update the database from the cursor's buffer If you want to use custom editors for displaying and editing data fields, you must install a custom QSqlPropertyMap. The form uses this object to get or set the value of a widget. Note that Qt Designer provides a visual means of creating data-aware forms. See also installPropertyMap(), QSqlPropertyMap, and Database Classes. MEMBER FUNCTION DOCUMENTATION
QSqlForm::QSqlForm ( QObject * parent = 0, const char * name = 0 ) Constructs a QSqlForm with parent parent and called name. QSqlForm::~QSqlForm () Destroys the object and frees any allocated resources. void QSqlForm::clear () [virtual slot] Removes every widget, and the fields they're mapped to, from the form. void QSqlForm::clearValues ( bool nullify = FALSE ) [virtual slot] Clears the values in all the widgets, and the fields they are mapped to, in the form. If nullify is TRUE (the default is FALSE), each field is also set to NULL. uint QSqlForm::count () const Returns the number of widgets in the form. QWidget * QSqlForm::fieldToWidget ( QSqlField * field ) const Returns the widget that field field is mapped to. void QSqlForm::insert ( QWidget * widget, const QString & field ) [virtual] Inserts a widget, and the name of the field it is to be mapped to, into the form. To actually associate inserted widgets with an edit buffer, use setRecord(). See also setRecord(). Examples: void QSqlForm::insert ( QWidget * widget, QSqlField * field ) [virtual protected] This is an overloaded member function, provided for convenience. It behaves essentially like the above function. Inserts a widget, and the field it is to be mapped to, into the form. void QSqlForm::installPropertyMap ( QSqlPropertyMap * pmap ) Installs a custom QSqlPropertyMap. This is useful if you plan to create your own custom editor widgets. QSqlForm takes ownership of pmap, so pmap is deleted when QSqlForm goes out of scope. See also QDataTable::installEditorFactory(). Example: sql/overview/custom1/main.cpp. void QSqlForm::readField ( QWidget * widget ) [virtual slot] Updates the widget widget with the value from the SQL field it is mapped to. Nothing happens if no SQL field is mapped to the widget. void QSqlForm::readFields () [virtual slot] Updates the widgets in the form with current values from the SQL fields they are mapped to. Examples: void QSqlForm::remove ( QWidget * widget ) [virtual protected] Removes a widget, and hence the field it's mapped to, from the form. void QSqlForm::remove ( const QString & field ) [virtual] This is an overloaded member function, provided for convenience. It behaves essentially like the above function. Removes field from the form. void QSqlForm::setRecord ( QSqlRecord * buf ) [virtual] Sets buf as the record buffer for the form. To force the display of the data from buf, use readFields(). See also readFields() and writeFields(). Examples: QWidget * QSqlForm::widget ( uint i ) const Returns the i-th widget in the form. Useful for traversing the widgets in the form. QSqlField * QSqlForm::widgetToField ( QWidget * widget ) const Returns the SQL field that widget widget is mapped to. void QSqlForm::writeField ( QWidget * widget ) [virtual slot] Updates the SQL field with the value from the widget it is mapped to. Nothing happens if no SQL field is mapped to the widget. void QSqlForm::writeFields () [virtual slot] Updates the SQL fields with values from the widgets they are mapped to. To actually update the database with the contents of the record buffer, use QSqlCursor::insert(), QSqlCursor::update() or QSqlCursor::del() as appropriate. Example: sql/overview/form2/main.cpp. SEE ALSO
http://doc.trolltech.com/qsqlform.html http://www.trolltech.com/faq/tech.html COPYRIGHT
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the license file included in the distribution for a complete license statement. AUTHOR
Generated automatically from the source code. BUGS
If you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports help us to help you. Thank you. The definitive Qt documentation is provided in HTML format; it is located at $QTDIR/doc/html and can be read using Qt Assistant or with a web browser. This man page is provided as a convenience for those users who prefer man pages, although this format is not officially supported by Trolltech. If you find errors in this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qsqlform.3qt) and the Qt version (3.3.8). Trolltech AS 2 February 2007 QSqlForm(3qt)
All times are GMT -4. The time now is 10:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy