06-01-2015
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi ,
I´m working on Solaris 9 SPARC and I´m writing a Script to mírror two disks..
I need to replace some text in a file ( /etc/vfstab ) .
For example:
/dev/dsk/c0t0d0s0 ==> /dev/md/dsk/d0
I just want to change the "/dev/dsk/" to "/dev/md/dsk/.
Thanks for your repsonse (5 Replies)
Discussion started by: networkfre@k
5 Replies
2. UNIX for Dummies Questions & Answers
I'm trying to replace text in a file with text from a variable
I have the following in my script, but its not working:
#!/bin/ksh
echo "Enter the path to load scripts"
read x
echo "updating the templates"
sed "s/CHANGE_ME_TO_LOAD_PATH/"$x"/g" LoadFiles.sh > LoadFiles2.sh
I thought... (1 Reply)
Discussion started by: orahi001
1 Replies
3. Shell Programming and Scripting
Howdy!
I'm trying to automate editing of a configuration file (custom.conf for GDM). I need to find every line between a line that starts with "" and the next line that starts with "", I want to preserve that line, but then delete all the lines in that configuration section and then insert... (3 Replies)
Discussion started by: TXTad
3 Replies
4. Shell Programming and Scripting
Hi,
My input file
form 1
fill 2
fill 3
form 4
fill 5
form 6
fill 7
form 8
Now i need to substiute according to the fill.
form followed by single fill need to be replced with category 1
form with above and below fill need to be repalced with category 2 (5 Replies)
Discussion started by: vasanth.vadalur
5 Replies
5. Shell Programming and Scripting
Hi,
I need to replace text in a file. Can someone help me write the proper sed command for this? My text file contains about a 100 lines of content. I want to replace the line containing
new_name = "#{options}-#{ENV}"
by, the following -
new_name = "#{options}-#{ENV}-#{rand(999)}"
... (1 Reply)
Discussion started by: ankush2kn
1 Replies
6. Shell Programming and Scripting
Hi,
I hope someone can help me out with the following:
I have a file with the following lines in it:
something /path/dir/my_-_file.01.ext sometext sometext
somethingelse /path/dir/my_-_file.02.ext sometext
something /path/dir/my_-_file.03.ext sometext some other text
And i want to... (3 Replies)
Discussion started by: thyssimonis
3 Replies
7. Shell Programming and Scripting
My apologies if this has been answered in a previous post. I've been doing a lot of searching, but I haven't been able to find what I was looking for. Specifically, I am wondering if I can utilize sed and/or awk to locate two strings in a file, and replace everything between those two strings... (12 Replies)
Discussion started by: kiddsupreme
12 Replies
8. Shell Programming and Scripting
Hi,
i want to replace
"Hi How
are You when
did you go to
delhi"
to
"Hi How
are you when
did you come from
delhi"
in a file.
Any idea how to do it? (2 Replies)
Discussion started by: abhitanshu
2 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I want to use sed to replace " /// " with "///" in a text file. However I am getting error messages when I use sed 's/ /// /////g' input.txt > output.txt. How do I go about doing this in sed?
Input:
219518_s_at 0.000189 ELL3 / SERINC4
Output:
219518_s_at 0.000189 ELL3/SERINC4 (5 Replies)
Discussion started by: evelibertine
5 Replies
10. UNIX for Beginners Questions & Answers
Hello Everyone,
I have many files like so:
file1.txt
file2.txt
file3.txt
Within each file I have many lines of random text separated by commas like so:
abcAAA,123,defAA,456777,ghiA,789
jklB,101,mnoBBB,11211,pqrB,13111
stuCC,415,vwxCCCC,161,yzaC,718
I am trying to use SED or AWK to... (4 Replies)
Discussion started by: D3U5X
4 Replies
LEARN ABOUT DEBIAN
hxcopy
HXCOPY(1) HTML-XML-utils HXCOPY(1)
NAME
hxcopy - copy an HTML file and update its relative links
SYNOPSIS
hxcopy [ -i old-URL ] [ -o new-URL ] [ file-or-URL [ file-or-URL ] ]
DESCRIPTION
The hxcopy command copies its first argument to its second argument, while updating relative links. The input is assumed to be HTML or
XHTML and may be slightly reformatted in the process.
If the second argument is omitted, hxcopy writes to standard output. In this case the option -o is required. If the first argument is also
omitted, hxcopy reads from standard input. In this case the option -i is required.
OPTIONS
The following options are supported:
-i old-URL
For the purposes of updating relative links, act as if old-URL is the location from which the input is copied. If this option is
omitted, the actual location of the first argument is used for calculating relative links.
-o new-URL
For the purposed of updating relative links, act as if new-URL is the location to which the input is copied. If this option is
omitted, the actual location of the second argument is used for calculating relative links.
ENVIRONMENT
To use a proxy to retrieve remote files, set the environment variables http_proxy and ftp_proxy. E.g., http_proxy="http://localhost:8080/"
BUGS
Unlike the last argument of cp(1), the last argument of hxcopy must be a file, not a directory.
The second argument must be a local file. Writing to a URL is not yet implemented. To work around this, replace hxcopy file.html
http://example.org/file.html by hxcopy -o http://example.org/file.html file.html tmp.html and then upload tmp.html to the given URL with
some other command, such as curl(1). The first argument, however, may be a URL. hxcopy will download the given file. (Currently only HTTP
is supported.)
EXAMPLE
Assume the HTML file foo.html contains a relative link to "../bar.html". Here are some examples of commands:
hxcopy foo.html bar/foo.html
The file foo.html is copied to ../bar/foo.html and the relative link to "../bar.html" becomes "../../bar.html".
hxcopy foo.html ../foo.html
The file foo.html is copied to ../foo.html and the relative link to "../bar.html" is rewritten as "bar.html".
hxcopy -i http://my.org/dir1/foo.html -o http://my.org/foo.html file1.html file2.html
The file file1.html is copied to file2.html and the relative link to "../bar.html" is rewritten as "bar.html". A command like this
may be useful to update files that are later uploaded to a server.
SEE ALSO
cp(1), curl(1), hxwls(1)
6.x 9 Dec 2008 HXCOPY(1)