Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Script to change/find/delete/install a specific file Post 302267418 by Great Uncle Kip on Friday 12th of December 2008 09:55:25 AM
Old 12-12-2008
Thanks very much vbe.

This is what I have so far-

cd ~
~/.mozilla
ls -a
echo "Do you wish to remove and re-install the .mozilla profile? Y/N"
read answer
echo "The answer is $answer"
exit 1
rm -rf .mozilla
cpio -icvdum < /pcms/data/mozilla_install.cpio
echo "Mozilla has been re-installed "

What I need to do now is get it so that if the answer to the echo is "Y", then the script continues (to remove the .mozilla), if not, to exit the script?

Regards
Kip
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to change a specific character in a file

Hi, I have a data file with following structure: a|b|c|d|3|f1|f2|f3 a|b|c|d|5|f1|f2|f3|f4|f5 I want to change this data to: a|b|c|d|3|f1;f2;f3 a|b|c|d|5|f1;f2;f3;f4;f5 Data in column 5 tells the number of following fields. All fields delimiter after the 5th column needs to be... (6 Replies)
Discussion started by: sdubey
6 Replies

2. UNIX for Dummies Questions & Answers

Change Specific Line of a File

Hi everyone, I am attempting to do something that should be very simple. How do I replace a specific line of a file with different text, and then save that file to its original name? I believe I want to use the sed command with the c option, but I after trying many times, I can't get the right... (10 Replies)
Discussion started by: msb65
10 Replies

3. Shell Programming and Scripting

Change specific ip address in a file

I need to change a line from a xen cfg file using sed if it's possible. The original line is: vif = I want to change ONLY the IP address of the second part ==> ip=10.1.10.4 to another IP --> ip=192.222.11.6 The first one ip=123.456.789.123 keeps untouchable. My new line shoud... (9 Replies)
Discussion started by: iga3725
9 Replies

4. Shell Programming and Scripting

Shell script to find specific file name and load data

I need help as to how to write a script in Unix for the following: We have 3 servers; The mainframe will FTP them to a folder. In that folder we will need the script to look and see if the specific file name is there and load it to the correct table. Can anyone pls help me out with... (2 Replies)
Discussion started by: msrahman
2 Replies

5. Shell Programming and Scripting

how to change specific value for a entry in the file

Hello All, can someone please suggest me a one line command to change a specific value that is associated to an entry in the file. for example #more schedulefile quartz.job.manual.bonus.schedule=0 0 9 ? * * # it should be changed to #more schedulefile... (5 Replies)
Discussion started by: bobby320
5 Replies

6. Shell Programming and Scripting

How to find a file with a specific pattern for current sysdate & upon find email the details?

I need assistance with following requirement, I am new to Unix. I want to do the following task but stuck with file creation date(sysdate) Following is the requirement I need to create a script that will read the abc/xyz/klm folder and look for *.err files for that day’s date and then send an... (4 Replies)
Discussion started by: PreetArul
4 Replies

7. UNIX for Beginners Questions & Answers

Delete columns with a specific title XXX, where the position change in each file

Goodmorning, I know how to cut a string and a column, and how to find a word. I have a file with over 100 columns. All columns have a title in the first line. I have to delete all columns with the XXX title. I can't use cut -f because the position of XXX columns change in each file, and in... (14 Replies)
Discussion started by: echo manolis
14 Replies

8. Shell Programming and Scripting

Count specific character of a file in each line and delete this character in a specific position

I will appreciate if you help me here in this script in Solaris Enviroment. Scenario: i have 2 files : 1) /tmp/TRANSACTIONS_DAILY_20180730.txt: 201807300000000004 201807300000000005 201807300000000006 201807300000000007 201807300000000008 2)... (10 Replies)
Discussion started by: teokon90
10 Replies

9. Shell Programming and Scripting

Find specific pattern and change some of block values using awk

Hi, Could you please help me finding a way to replace a specific value in a text block when matching a key pattern ? I got the keys and the values from a command similar to: echo -e "key01 Nvalue01-1 Nvalue01-2 Nvalue01-3\nkey02 Nvalue02-1 Nvalue02-2 Nvalue02-3 \nkey03 Nvalue03-1... (2 Replies)
Discussion started by: alex2005
2 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 07:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy