04-18-2011
thanks ctsgnb! from this I got a clue and wrote below command which worked for me
nawk -F"<" ' { for(i=18;i<=NF-1;i++){ print "<"$i } }' File.xml > temp.xml
tr -d '\n' < temp.xml > File.xml
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I've got a configuration file that is filled with xml text statements for example:
<...../>
<...../>
<...../>
<data id="java-options" value="-server -Djava.security.policy..../>
<...../>
<...../>
<...../>
I want to write a korn shell script that will go to this specific line and add a... (2 Replies)
Discussion started by: progkcp
2 Replies
2. Shell Programming and Scripting
Hi..
How to search for multiple words in a single line using grep?.
Eg: Jack and Jill went up the hill
Jack and Jill were best friends
Humpty and Dumpty were good friends too
----------
I want to extract the 2nd statement(assuming there are several statements with... (11 Replies)
Discussion started by: anduzzi
11 Replies
3. Shell Programming and Scripting
Hi
Is it possible to do the following in a single command
/usr/xpg4/bin/sed -e '/rows selected/d' /aemu/CALLAUTO/callauto.txt > /aemu/CALLAUTO/callautonew.txt
/usr/xpg4/bin/sed -e '/^$/d' /aemu/CALLAUTO/callautonew.txt > /aemu/CALLAUTO/callauto_new.txt
exit (1 Reply)
Discussion started by: aemunathan
1 Replies
4. Shell Programming and Scripting
Hello,
Need help substituting a particular word in a file having a single line but no newline character at the end.
I was trying to use sed but it doesn't work probably because there is no newline char at the end of the line.
$ cat hlq_detail
/outputs/alvan23/PDFs/bills
$ cat... (5 Replies)
Discussion started by: Shan_u2005
5 Replies
5. Shell Programming and Scripting
The file contains one line of text followed by a number. I want to take the number X at the end, take it out and display the last X words. X is the key telling me how many words from the end that I want and X will always be less than the number of words, so no problem there.
Example input and... (4 Replies)
Discussion started by: fubaya
4 Replies
6. Shell Programming and Scripting
FOLKS ,
i have a text file that is generated automatically of an another korn shell script, i want to bring in the fifth line of the text file in to my korn shell script and look for a particular word in the line . Can you all share some thoughts on this one.
thanks...
Venu (3 Replies)
Discussion started by: venu
3 Replies
7. UNIX for Dummies Questions & Answers
I would like to add a line to the end of a single column text file. How do I go about doing that?
Input:
BEGIN
1
2
3
Output:
BEGIN
1
2
3
END
Thanks! (1 Reply)
Discussion started by: evelibertine
1 Replies
8. Shell Programming and Scripting
I am trying to build a sinkhole for BIND. I created a master zone file for malicious domains and created a separate conf file, but I am stuck.
I have a list of known bd domains that is updated nightly. The file simply contains the list of domains, one on each line:
Bad.com
Bad2.com... (4 Replies)
Discussion started by: uuallan
4 Replies
9. Shell Programming and Scripting
Hello programmers,
I need to create a list of unique words from a text file using PERL...may i have the code for that please?
Thank you (1 Reply)
Discussion started by: alsohari
1 Replies
10. UNIX for Beginners Questions & Answers
hi I made this simple script to extract data and pretty much is a list and would like to extract data of two words separated by commas and I would like to make a new text file that would list these extracted data into a list and each in a new line.
Example that worked for me with text file... (5 Replies)
Discussion started by: dandaryll
5 Replies
LEARN ABOUT DEBIAN
bup-meta
bup-meta(1) General Commands Manual bup-meta(1)
NAME
bup-meta - create or extract a metadata archive
SYNOPSIS
bup meta --create
[-R] [-v] [-q] [--no-symlinks] [--no-paths] [-f file] <paths...>
bup meta --list
[-v] [-q] [-f file]
bup meta --extract
[-v] [-q] [--numeric-ids] [--no-symlinks] [-f file]
bup meta --start-extract
[-v] [-q] [--numeric-ids] [--no-symlinks] [-f file]
bup meta --finish-extract
[-v] [-q] [--numeric-ids] [-f file]
DESCRIPTION
bup meta either creates or extracts a metadata archive. A metadata archive contains the metadata information (timestamps, ownership,
access permissions, etc.)
for a set of filesystem paths.
OPTIONS
-c, --create
Create a metadata archive for the specified paths. Write the archive to standard output unless --file is specified.
-t, --list
Display information about the metadata in an archive. Read the archive from standard output unless --file is specified.
-x, --extract
Extract a metadata archive. Conceptually, perform --start-extract followed by --finish-extract. Read the archive from standard
input unless --file is specified.
--start-extract
Build a filesystem tree matching the paths stored in a metadata archive. By itself, this command does not produce a full restora-
tion of the metadata. For a full restoration, this command must be followed by a call to --finish-extract. Once this command has
finished, all of the normal files described by the metadata will exist and be empty. Restoring the data in those files, and then
calling --finish-extract should restore the original tree. The archive will be read from standard input unless --file is specified.
--finish-extract
Finish applying the metadata stored in an archive to the filesystem. Normally, this command should follow a call to --start-
extract. The archive will be read from standard input unless --file is specified.
-f, --file=filename
Read the metadata archive from filename or write it to filename as appropriate. If filename is "-", then read from standard input
or write to standard output.
-R, --recurse
Recursively descend into subdirectories during --create.
--numeric-ids
Apply numeric user and group IDs (rather than text IDs) during --extract or --finish-extract.
--symlinks
Record symbolic link targets when creating an archive, or restore symbolic links when extracting an archive (during --extract or
--start-extract). This option is enabled by default. Specify --no-symlinks to disable it.
--paths
Record pathnames when creating an archive. This option is enabled by default. Specify --no-paths to disable it.
-v, --verbose
Be more verbose (can be used more than once).
-q, --quiet
Be quiet.
EXAMPLES
# Create a metadata archive for /etc.
$ bup meta -cRf etc.meta /etc
bup: removing leading "/" from "/etc"
# Extract the etc.meta archive (files will be empty).
$ mkdir tmp && cd tmp
$ bup meta -xf ../etc.meta
$ ls
etc
# Restore /etc completely.
$ mkdir tmp && cd tmp
$ bup meta --start-extract -f ../etc.meta
...fill in all regular file contents using some other tool...
$ bup meta --finish-extract -f ../etc.meta
BUGS
Hard links are not handled yet.
BUP
Part of the bup(1) suite.
AUTHORS
Rob Browning <rlb@defaultvalue.org>.
Bup unknown- bup-meta(1)