11-02-2007
Thanks
thanks a lot for help.
Just one more query.
How to copy the whole file, except last N lines to another file?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a abc.txt file.
In this file there is a SQL query which Iwant to copy and print it on another file.The query (for eg) is written like this:
SELECT field1,
field2,
field3
from table1,table2
where <conditions>
END
I want to copy this query to another... (3 Replies)
Discussion started by: jisha
3 Replies
2. UNIX for Dummies Questions & Answers
Hi all,
I'm new to shell scripting.
I want to copy the first N lines from a file to another file.
Can someone please tell me how this can be done.
Thanks
Himi (2 Replies)
Discussion started by: HIMANI
2 Replies
3. UNIX for Advanced & Expert Users
how to copy lines from a log file based on timestamp.
INFO (RbrProcessFlifoEventSessionEJB.java:processFlight:274) - E_20080521_110754_967: rbrAciInfoObjects listing complete!
INFO (RbrPnrProcessEventSessionEJB.java:processFlight:197) - Event Seq: 1647575217; Carrier: UA; Flt#: 0106; Origin:... (1 Reply)
Discussion started by: ranjiadmin
1 Replies
4. Shell Programming and Scripting
Hi All,
I have a file that gives me new line/output every 5 minutes. I need to create a script that capture new line/output besides "IN CRON_STATUS", in this case the new output is "begin ------ cron_status.sh - -----------".
I want this script to capture the line starting from "begin ------... (0 Replies)
Discussion started by: fara_aris
0 Replies
5. Shell Programming and Scripting
Hello everyone. I have a log file that contains multiple domains:
www.thisdomain.com
agent.thisdomain.com
that.thisdomain.com
I need to copy all of the lines that contain "www.thisdomain.com" from the log and output them into a new file. I've tried everything with little luck. Please help... (3 Replies)
Discussion started by: aberli
3 Replies
6. Shell Programming and Scripting
Hello,
I have a text file which I need to check for presence of certain tags, and then copy a subsequent portion of text into another file. The tag matching canbe done with Grep but I do not know how to copy selective lines from one file to another. Is it possible do that?
I checked up some... (8 Replies)
Discussion started by: ajayram
8 Replies
7. Shell Programming and Scripting
Hi Guys,
I have the following problem. I have original file (org.txt) that looks like this
module v_1(.....)
//arbitrary number of text lines
endmodule
module v_2(....)
//arbitrary number of text lines
endmodule
module v_3(...)
//arbitrary number of text lines
endmodule
module... (6 Replies)
Discussion started by: kaaliakahn
6 Replies
8. Shell Programming and Scripting
Hi Guys,
I have an awk script that would search the input file for line that starts with a number 3 and copies into a new text file.
I want to extend this script to find the lines that either starts with 3 or a or b and copy all those lines into the new file.
Here is what I have so far:... (1 Reply)
Discussion started by: Amith821
1 Replies
9. UNIX for Beginners Questions & Answers
Dear all,
I have stuck with this problem for some days.
I have a very big file, this file can not open by vi command.
There are 200 loops in this file, in each loop will have one line like this:
GWA quasiparticle energy with Z factor (eV)
And I need 98 lines next after this line.
Is... (6 Replies)
Discussion started by: phamnu
6 Replies
10. Shell Programming and Scripting
OS : RHEL 7.2
Shell : bash
I have a file which has lines like below
I want to copy from 2nd line to the 6th line and copy(redirect) those lines to another file.
$ cat patterns.txt
hello world
hello asia
hello europe
hello africa
hello america
hello antartica
hello... (9 Replies)
Discussion started by: omega3
9 Replies
LEARN ABOUT SUNOS
wsreg_query_set_location
wsreg_query_set_location(3WSREG) Product Install Registry Library Functions wsreg_query_set_location(3WSREG)
NAME
wsreg_query_set_location, wsreg_query_get_location - set or get the location of a query
SYNOPSIS
cc [flag ...] file ...-lwsreg [library ...]
#include <wsreg.h>
int wsreg_query_set_location(Wsreg_query *query, const char *location);
char *wsreg_query_get_location(Wsreg_query *query);
DESCRIPTION
The wsreg_query_set_location() function sets the location specified by location in the query specified by query. If a location has already
been set in the specified query, the resources associated with the previously set location are released.
The wsreg_query_get_location() function gets the location string from the query specified by query.
RETURN VALUES
The wsreg_query_set_location() function returns a non-zero value if the location was set correctly; otherwise 0 is returned.
The wsreg_query_get_location() function returns the location from the specified query structure. The resulting location string is not a
copy, so it must not be released by the caller.
USAGE
The query identifies fields used to search for a specific component in the product install registry. By specifying the install location,
the component search is narrowed to all components in the product install registry that are installed in the same location.
Other fields can be specified in the same query to further narrow the search.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|MT-Level |Unsafe |
+-----------------------------+-----------------------------+
SEE ALSO
wsreg_get(3WSREG), wsreg_initialize(3WSREG), wsreg_query_create(3WSREG), attributes(5)
SunOS 5.10 22 Sep 2000 wsreg_query_set_location(3WSREG)