Sponsored Content
Top Forums Shell Programming and Scripting how to write multiple lines to a file using shell script? Post 302583008 by vel4ever on Monday 19th of December 2011 09:58:20 AM
Old 12-19-2011
hi corona,
Thanks for your reply..but i cant open the file i have created after using the script u have provided..it just error out. i new to shell scripting please help.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to write shell script to extract lines we want

hi i have a file which is very large . it contains lines in the format below: seed url, html url .... ... seed url, html url i have sort it already. 2010ÄÏ·ÇÊÀ½ç±*_¾º¼¼·ç±©_ÐÂÀËÍø ÕżªÁúרÀ¸£ºÊÀ½ç±*24ÄêµÄ»ØÒä ÆÚÅÎÑÇÖÞδÀ´ÍŽá_2010ÄÏ·ÇÊÀ½ç±*_¾º¼¼·ç±©_ÐÂÀËÍø 2010ÄÏ·ÇÊÀ½ç±*_¾º¼¼·ç±©_ÐÂÀËÍø ¹úÃ×Óë±´ÄáÌØ˹´ï³ÉÐ*Òé... (6 Replies)
Discussion started by: rainboisterous
6 Replies

2. Shell Programming and Scripting

shell script: grep multiple lines after pattern match

I have sql file containing lot of queries on different database table. I have to filter specific table queries. Let say i need all queries of test1,test2,test3 along with four lines above it and sql queries can be multi lines or in single line. Input file contains. set INSERT_ID=1; set... (1 Reply)
Discussion started by: mirfan
1 Replies

3. Shell Programming and Scripting

write shell script to search file in folder

hi .. i have a problem how to search file with date and version number(ms_2.0_dd/mm/yy_24)in folder.Here 24 is version number and compare the this file to other file which is in another folder and if does not match then copy this file to respective folder.Also copy different files in different... (1 Reply)
Discussion started by: shubhig15
1 Replies

4. Shell Programming and Scripting

write shell script to rename file

hi, I need some help in writing shell script in a bourne shell.I am trying to rename the file.. eg. find /root/data -type f -name "text*) | while read FILES do newfile=${FILES/type_2.0_20101208_34.xml / tmp.xml} mv "$FILES" "$newfile" done above written script is working...If the... (7 Replies)
Discussion started by: shubhig15
7 Replies

5. UNIX for Dummies Questions & Answers

Simple script to write new lines in a text file

Hello, I have a comma seperated data sheet with multiple fields of biological data. One column contains the ID name of the sample, where there could be more than one sample separated by a comma. I would like a script that reads this field, and for each sample ID, copies the entire line and writes... (18 Replies)
Discussion started by: torchij
18 Replies

6. Shell Programming and Scripting

Commenting Multiple lines using Shell Script

I have an xml file which has following code : <abc-ref> <abc-name>abc.efg.hij.klm</abc-name> </abc-ref> I want to comment this whole section out and I have written the following script : (where "hij" is unique string in the file) TEMPFILE=replaceYY.tmp file=hello.xml sed -n... (6 Replies)
Discussion started by: Dish
6 Replies

7. Shell Programming and Scripting

Need to write shell script for my .sql file call

Hi Guys, I need to write a simple shell script which will generate a .csv file/report by calling .sql file inside a shell script. Can somebody help me on this. Thanks in advance! Regards, LK (7 Replies)
Discussion started by: lakshmanraok117
7 Replies

8. Shell Programming and Scripting

Help with Shell Script to identify lines in file1 and write them to file2

Hi, I am running my pipeline and capturing all stout from multiple programs to a .txt file. I want to go into that .txt file and search for specific lines, and finally print those lines in a second .txt file. I can do this using grep, awk, or sed for each line, but have not been able to get... (2 Replies)
Discussion started by: hmortens
2 Replies

9. Shell Programming and Scripting

Need help to write a shell script to convert text file to excel file.

Hi Everyone, I want your help to write a script which will take text file as input and on the basis of delimiter ":"script will create excel sheet. Example input: IpAdress:InstanceName:Port:ServerName 10.255.255.1:abc:2232:xyz_abc Output should be an excel sheet like below: Column... (8 Replies)
Discussion started by: akabhinav18
8 Replies

10. Shell Programming and Scripting

Shell script count lines and sum numbers from multiple files

I want to count the number of lines, I need this result be a number, and sum the last numeric column, I had done to make this one at time, but I need to make this for a crontab, so, it has to be an script, here is my lines: It counts the number of lines: egrep -i String file_name_201611* |... (5 Replies)
Discussion started by: Elly
5 Replies
QAxScriptEngine(3qt)													      QAxScriptEngine(3qt)

NAME
QAxScriptEngine - Wrapper around a script engine SYNOPSIS
This class is part of the Qt ActiveQt Extension. #include <qaxscript.h> Inherits QAxObject. Public Members enum State { Uninitialized = 0, Initialized = 5, Started = 1, Connected = 2, Disconnected = 3, Closed = 4 } QAxScriptEngine ( const QString & language, QAxScript * script ) ~QAxScriptEngine () bool isValid () const bool hasIntrospection () const QString scriptLanguage () const State state () const void setState ( State st ) void addItem ( const QString & name ) long queryInterface ( const QUuid & uuid, void ** iface ) const DESCRIPTION
This class is defined in the Qt ActiveQt Extension, which can be found in the qt/extensions directory. It is not included in the main Qt API. The QAxScriptEngine class provides a wrapper around a script engine. Every instance of the QAxScriptEngine class represents an interpreter for script code in a particular scripting language. The class is usually not used directly. The QAxScript and QAxScriptManager classes provide convenient functions to handle and call script code. Direct access to the script engine is provided through queryInterface(). Warning: This class is not available with the bcc5.5 and MingW compilers. Member Type Documentation QAxScriptEngine::State The State enumeration defines the different states a script engine can be in. QAxScriptEngine::Uninitialized - The script has been created, but not yet initialized QAxScriptEngine::Initialized - The script has been initialized, but is not running QAxScriptEngine::Started - The script can execute code, but does not yet handle events QAxScriptEngine::Connected - The script can execute code and is connected so that it can handle events QAxScriptEngine::Disconnected - The script is loaded, but is not connected to event sources QAxScriptEngine::Closed - The script has been closed. MEMBER FUNCTION DOCUMENTATION
QAxScriptEngine::QAxScriptEngine ( const QString & language, QAxScript * script ) Constructs a QAxScriptEngine object interpreting script code in language provided by the code in script. This is usually done by the QAxScript class when loading a script. Instances of QAxScriptEngine should always have both a language and a script. QAxScriptEngine::~QAxScriptEngine () Destroys the QAxScriptEngine object, releasing all allocated resources. void QAxScriptEngine::addItem ( const QString & name ) Registers an item with the script engine. Script code can refer to this item using name. bool QAxScriptEngine::hasIntrospection () const Returns TRUE if the script engine supports introspection; otherwise returns FALSE. bool QAxScriptEngine::isValid () const Returns TRUE if the script engine has been initialized correctly; otherwise returns FALSE. long QAxScriptEngine::queryInterface ( const QUuid & uuid, void ** iface ) const Requests the interface uuid from the script engine object and sets the value of iface to the provided interface, or to 0 if the requested interface could not be provided. Returns the result of the QueryInterface implementation of the COM object. QString QAxScriptEngine::scriptLanguage () const Returns the scripting language, for example "VBScript", or "JScript". void QAxScriptEngine::setState ( State st ) Sets the state of the script engine to st. Calling this function is usually not necessary. State QAxScriptEngine::state () const Returns the state of the script engine. SEE ALSO
http://doc.trolltech.com/qaxscriptengine.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 (qaxscriptengine.3qt) and the Qt version (3.3.8). Trolltech AS 2 February 2007 QAxScriptEngine(3qt)
All times are GMT -4. The time now is 03:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy