10-31-2008
I am able to get the first double quotes using simple vi i.e
:%s/start_times: /start_times: "/g
the problem is when ti comes to the trailing double quote. I am trying to use anchors and shall let you know how it works... Thanks for the update
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
I'm trying to do a global search and replace in vi. I am trying to replace a string, call it "BOB" with a carriage return and can't seem to find a reference to it.
Command syntax s%/BOB/???/g
What would I substitute the "???" with? (7 Replies)
Discussion started by: barnettdk
7 Replies
2. Shell Programming and Scripting
Is there any way we can achieve search & replace with awk?
I could achieve the same with sed in following way -
sed 's/A/B/g' file1 > file2
But the same regex if I try with using awk following way,
awk 's/A/B/g' file1 > file2
it gives me Syntax error. I strongly believe I am... (1 Reply)
Discussion started by: videsh77
1 Replies
3. Shell Programming and Scripting
Can I use search & replace in any variable?
Suppose I have one variable named var1 which holds value "abcabc" I need to search 'a' in var1 and want to replace with 'x' like 'xbcxbc'. Is it possible? Can you provide me an example?
Malay (3 Replies)
Discussion started by: malaymaru
3 Replies
4. UNIX for Dummies Questions & Answers
Hey, I want to have a C program which, for an existing file supplied by the command line argument (E.g. File1.txt) replaces all the occurrences of the words:
"We” or “we” by “I”
“a” by “the”
“A” by “The”.
Then print the replaced file. All other characters of the file are to be left... (1 Reply)
Discussion started by: IwishIknewC
1 Replies
5. Shell Programming and Scripting
I have a file that has some accent characters in it when viewed in some text editors, but when viewed in vi they come in as ~R and ~U. I need to make a script to remove these characters from the file, but have been unsuccessful. I am not sure how sed or awk, or something similar is viewing them,... (8 Replies)
Discussion started by: tcovert
8 Replies
6. Shell Programming and Scripting
Hi I'm trying to replace a string in the files ending with *.txt
Unable to get the sed to do the job. any help would be appreciated :)
I'm on SunOS
#!/bin/bash
startdirectory={$HOME}/pp_test
searchterm="change"
replaceterm="CHANGE"
echo $searchterm
echo $replaceterm
for file in... (4 Replies)
Discussion started by: mqueue
4 Replies
7. Shell Programming and Scripting
Hi all,
I have one question that hopefully isn't too complicated for the more advanced users here. In one of the Solaris KSH scripts I'm working on, is it possible to script the following:
- If there "is" an empty blank line "at the end" of /tmp/text.txt, then remove only that one empty... (3 Replies)
Discussion started by: chatguy
3 Replies
8. Shell Programming and Scripting
Hi,
My problem is that I have to search a changing pattern and replace it with the wild card char "*"
i/p: 99_*_YYYYMMDD_SRC.txt.tar.gz
o/p: 99_*_*_SRC.txt.tar.gz
The problem is that YYYYMMDD pattern is not static. It could be YYYYMMDDHHMI or could be YYYYMMDDHHMISS.
Can... (10 Replies)
Discussion started by: dips_ag
10 Replies
9. Shell Programming and Scripting
Hi all
Please can you help me with a script to check several files for the following string:
encoding=""and replace it with:
encoding="UTF-8"I did the following, :
#!/bin/sh
string1="encoding="""
string2="encoding="UTF-8"
sed 's/'"$string1"'/'"$string2"'/g'but does not work.
Please can... (18 Replies)
Discussion started by: fretagi
18 Replies
10. Shell Programming and Scripting
Hi Gurus,
I have two files. I want to read sessoin_name from the file1 and replace $Param4 & $Param5 in file2 with connection_name in specified in file1.
The file1 will have data in following format
File 1
session_name,connection_name
s_abcd,Listener_2
s_def,Listener_1
source file... (7 Replies)
Discussion started by: r_t_1601
7 Replies
LEARN ABOUT DEBIAN
xfce4-dict
XFCE4-DICT(1) XFCE4-DICT(1)
NAME
xfce4-dict -- a client program to query different dictionaries
SYNOPSIS
xfce4-dict [option] [text ...]
DESCRIPTION
xfce4-dict allows you to search different kinds of dictionary services for words or phrases and shows you the result. Currently you can
query a "Dict" server(RFC 2229), any online dictionary service by opening a web browser or search for words using a spell check program
like aspell, ispell or enchant.
Homepage: http://goodies.xfce.org/projects/applications/xfce4-dict
OPTIONS
If called without any arguments, the xfce4-dict main window is shown. Any passed text argument(s) are used as search text.
-d, --dict
Search the given text using a Dict server(RFC 2229).
-w, --web Search the given text using a web-based search engine.
-t, --text-field
Grab the focus on the text field in the panel (has no effect if panel plugin is not loaded).
-s, --spell
Check the given text with a spellchecker.
-i, --ignore-plugin
Start stand-alone application even if the panel plugin is loaded.
-c, --clipboard
Grabs the PRIMARY selection content (X selection clipboard), uses it as search text and performs a search. This is useful when
you want to create keyboard shortcuts for this command. The search method can be specified with the -d, -w and -s options, if
not specified the default search method is used. If the PRIMARY clipboard doesn't contain any text, the normal clipboard is
used.
-v, --verbose
Be verbose (print useful status messages).
-V, --version
Show version information.
-?, --help
Show help information and exit.
xfce4-dict supports all generic GTK options, a list is available on the help screen.
BUGS
There is a limitation of max. 12 characters in passing a search term to xfce4-dict when the panel plugin is loaded. That is, if you pass a
search term as command line argument(s) to xfce4-dict which is longer than 12 characters, it is truncated. To be exact, the limit is 12
bytes so if the search term contains any non-ASCII characters it might be even less than 12 characters. To work around this limitation,
you can add the command line '-i' so that xfce4-dict will start a single stand-alone application. Then all passed text is used as search
term.
AUTHOR
This manual page was written by Enrico Troeger. Permission is granted to copy, distribute and/or modify this document under the terms of
the GNU General Public License, Version 2, or (at your option) any later version.
xfce4-dict 0.6.0 December 31, 2009 XFCE4-DICT(1)