10-29-2009
writing string to specific line
I want to put a text string in file using any method on specific line
line number 30
text to be put %this is location /var/www/filename
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am looking for a way to remove any line in a text file that contains the string "Mac address". I guess you would grep and sed, but I am not sure how to do this. Thanks for you help. (3 Replies)
Discussion started by: CBarraford
3 Replies
2. Shell Programming and Scripting
Hi, guys. I have one question:
How can I search for a line with certain string in it and then insert a string into this line?
For example:
There is a file called shadow, the contents of it are below:
**************************
...
yuanz:VIRADxMsadfDF/Q:0:0:50:7:::... (9 Replies)
Discussion started by: daikeyang
9 Replies
3. UNIX for Dummies Questions & Answers
hi,
i currently have a file with columns similar to this
customer name owed
CID123 John 300
CID342 harry 500
at present i use use awk to find the amount owed by the customer using the customer ID (CID).
if the customer spends more money how would i go about using sed/awk etc to... (2 Replies)
Discussion started by: skinnygav
2 Replies
4. Shell Programming and Scripting
using sed to replace a specific string on a specific line number using variables
this is where i am at
grep -v WARNING output | grep -v spawn | grep -v Passphrase | grep -v Authentication | grep -v '/sbin/tfadmin netguard -C'| grep -v 'NETWORK>' >> output.clean
grep -n Destination... (2 Replies)
Discussion started by: todd.cutting
2 Replies
5. Shell Programming and Scripting
Hi,
I have a to modify a line and insert a keyword in the middle to a specific location.
My line looks like this
FIELDS TERMINATED BY '|' OPTIONALLY ENCLOSED BY '"' TRAILING NULLCOLS (ABC, DEF, GHI)
I want to change it as
FIELDS TERMINATED BY '|' OPTIONALLY ENCLOSED BY '"' TRAILING... (4 Replies)
Discussion started by: mwrg
4 Replies
6. Shell Programming and Scripting
Hi Gurus
I am new to this forum.. I am using HP Unix OS.
I have one single string in input file as shown below
Abc123 | cde | fgh | ghik| lmno | Abc456 |one |two |three | four | Abc789 | five | Six | seven | eight | Abc098 | ........
I want to achive the result in a output file as shown... (3 Replies)
Discussion started by: kannansr621
3 Replies
7. Shell Programming and Scripting
Dear All,
I have input file like this,
001
059
079
996
758
079
069
059
079
...
...
Desired output:
AA 001
BB 059 (4 Replies)
Discussion started by: attila
4 Replies
8. Shell Programming and Scripting
Hi,
I'm trying to replace a string with sed, in a text file containing this pattern:
location alpha
value x
location beta
value y
location gamma
value y
location delta
value y
location theta
value z
...
What I want to achieve is:
Find location beta into text file... (1 Reply)
Discussion started by: TECK
1 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I would like to comment a line that matched a string "sreenivas" in a file without opening it.
Thanks in advance.
Regards,
Sreenivas (3 Replies)
Discussion started by: raosr020
3 Replies
10. Shell Programming and Scripting
I would like to identify every line with a specific string, in this case: "Mamma".
I would like to remove that line, and also the line above it and below it. So the below
Where are all amazing Flats
Look At The Great Big White
Hey There Hot Mamma
You Are So hot Baby
I wish You were Mine... (5 Replies)
Discussion started by: phpchick
5 Replies
LEARN ABOUT REDHAT
urlview
urlview(1) General Commands Manual urlview(1)
NAME
urlview - URL extractor/launcher
SYNOPSIS
urlview filename [ filename ... ]
DESCRIPTION
urlview is a screen oriented program for extracting URLs from text files and displaying a menu from which you may launch a command to view
a specific item.
CONFIGURATION
urlview attempts to read ~/.urlview upon startup. If this file doesn't exist, it will try to read a system wide file in /etc/urlview.conf.
There are two configuration commands (order does not matter):
REGEXP regexp
urlview uses a regular expression to extract URLs from the specified text files.
, ,
and f are all converted to their nor-
mal printf(3) meanings. The default REGEXP is:
(((https?|ftp|gopher)://|(mailto|file|news):)[^' <>"]+|(www|web|w3).[-a-z0-9.]+)[^' .,;<>":]
COMMAND command
If the specified command contains a %s, it will be subsituted with the URL that was requested, otherwise the URL is appended to the
COMMAND string. The default COMMAND is:
url_handler.sh %s
Note: You should never put single quotes around the %s. urlview does this for you, and also makes sure that single quotes eventually show-
ing up inside the URL are handled properly. (Note that this shouldn't happen with the default regular expression, which explicitly
excludes single quotes.)
FILES
/etc/urlview.conf
system-wide urlview configuration file
~/.urlview
urlview configuration file
SEE ALSO
printf(3), regcomp(3), regex(7)
AUTHOR
Michael Elkins <me@cs.hmc.edu>.
Modified for Debian by Luis Francisco Gonzalez <luisgh@debian.org>.
Modified for SuSE by Dr. Werner Fink <werner@suse.de> and Stepan Kasal <kasal@suse.cz>.
Changes put together by Thomas Roessler <roessler@does-not-exist.org>.
urlview(1)