Re: How to use sed with variables with slashes in them.
On 12/05/2014 07:24 PM, Prosun Prodhan wrote: Thanks for the explanation with example. I learn kind of strange. You can give me the most beautiful explanation and I draw a blank. As soon as you show me an example, bingo! -- ~~ Computers are like air conditioners. They malfunction when you open windows ~~
Re: How to use sed with variables with slashes in them.
On 12/05/2014 07:19 PM, Kevin K wrote: On Dec 5, 2014, at 9:08 PM, ToddAndMargo wrote: Hi All, This took me an very frustrating hour to figure out. Especially since I was looking for something like awk's "-F" command. I hope this save someone else from pulling their hair out! (I was trying to do a substitution with a ton of forward slashes in it from a variable. H!) -T Example of substitute example: $ echo "$(echo "TRUE" | sed -e 's/TRUE/FALSE/g')" FALSE "g" is for "global" Example with variables (use full quotes): $ X="abcd" $ Y="xyz" $ echo $X | sed -e "s/${X}/${Y}/" xyz If a variable uses a "/" inside it, use a different "delimiter" (the first character after the "s" tells sed what the delimiter is): $ X="./abcd" $ Y="./xyz" $ echo $X | sed -e "s|${X}|${Y}|" ./xyz This works inside of vi too. I recall years ago when using “vi’ clones. Before VIM became popular and I would use other clones. They generally only supported / as a delimiter, and using something different (I normally use -) was an example of where their compatibility broke down. Hi Kevin, This I did not know. I still use vi a lot too. Thank you for sharing! -T -- ~~ Computers are like air conditioners. They malfunction when you open windows ~~
Re: How to use sed with variables with slashes in them.
Thanks for the explanation with example. Prosun Prodhan 09339192066(M) Registered Linux User # 318610 (LiCo : http://www.linuxcounter.net, formerly http://counter.li.org) Use Open Document Format. Try OpenOffice (http://www.openoffice.org) or LibreOffice (http://www.libreoffice.org) - Free Of Cost. [When you say, "I wrote a program that crashed Windows," people just stare at you blankly and say, "Hey, I got those with the system, for free." - Linus Torvalds] NOTICE: This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain malware - harmful to the system. The sender therefore does not accept liability for any errors or omissions in the contents/attachments of this message, which arise as a result of e-mail transmission. Please note that this is a PERSONAL mail-id and any views or opinions presented in this email are solely those of the author and do not necessarily represent those of any company. On Sat, Dec 6, 2014 at 3:08 AM, ToddAndMargo wrote: > Hi All, > > This took me an very frustrating hour to figure out. Especially > since I was looking for something like awk's "-F" command. > > I hope this save someone else from pulling their hair out! > (I was trying to do a substitution with a ton of forward slashes > in it from a variable. H!) > > -T > > > > Example of substitute example: > > > $ echo "$(echo "TRUE" | sed -e 's/TRUE/FALSE/g')" > FALSE > > "g" is for "global" > > > > Example with variables (use full quotes): > > $ X="abcd" > $ Y="xyz" > $ echo $X | sed -e "s/${X}/${Y}/" > xyz > > > If a variable uses a "/" inside it, use a different "delimiter" (the > first character after the "s" tells sed what the delimiter is): > > > $ X="./abcd" > $ Y="./xyz" > $ echo $X | sed -e "s|${X}|${Y}|" > ./xyz >
Re: How to use sed with variables with slashes in them.
> On Dec 5, 2014, at 9:08 PM, ToddAndMargo wrote: > > Hi All, > > This took me an very frustrating hour to figure out. Especially > since I was looking for something like awk's "-F" command. > > I hope this save someone else from pulling their hair out! > (I was trying to do a substitution with a ton of forward slashes > in it from a variable. H!) > > -T > > > > Example of substitute example: > > > $ echo "$(echo "TRUE" | sed -e 's/TRUE/FALSE/g')" > FALSE > > "g" is for "global" > > > > Example with variables (use full quotes): > > $ X="abcd" > $ Y="xyz" > $ echo $X | sed -e "s/${X}/${Y}/" > xyz > > > If a variable uses a "/" inside it, use a different "delimiter" (the > first character after the "s" tells sed what the delimiter is): > > > $ X="./abcd" > $ Y="./xyz" > $ echo $X | sed -e "s|${X}|${Y}|" > ./xyz This works inside of vi too. I recall years ago when using “vi’ clones. Before VIM became popular and I would use other clones. They generally only supported / as a delimiter, and using something different (I normally use -) was an example of where their compatibility broke down.
How to use sed with variables with slashes in them.
Hi All, This took me an very frustrating hour to figure out. Especially since I was looking for something like awk's "-F" command. I hope this save someone else from pulling their hair out! (I was trying to do a substitution with a ton of forward slashes in it from a variable. H!) -T Example of substitute example: $ echo "$(echo "TRUE" | sed -e 's/TRUE/FALSE/g')" FALSE "g" is for "global" Example with variables (use full quotes): $ X="abcd" $ Y="xyz" $ echo $X | sed -e "s/${X}/${Y}/" xyz If a variable uses a "/" inside it, use a different "delimiter" (the first character after the "s" tells sed what the delimiter is): $ X="./abcd" $ Y="./xyz" $ echo $X | sed -e "s|${X}|${Y}|" ./xyz
Re: bluegriffon
On 12/05/2014 05:57 AM, Michael Tiernan wrote: On 12/4/14 8:52 PM, Yasha Karant wrote: For specific uses, I need an application similar to Blue Griffon Two things, first is to try a slightly older version of BG to see if that fixes your problem. Second, the best alternative and cross platform is KompoZer (which is what BG was built from). http://www.kompozer.net/ You'll find RPMs on their website too. From the kompozer URL: Latest stable version: 0.7.10 (2007-08-30) This is a beta version (by release number, albeit "stable" by declaration) that is more than seven years old. I have used kompozer in the past, but komopozer was not keeping up with some of the "new" features that appear in certain web pages. As BlueGriffon uses the current Firefox "internals", it more closely adapts to certain of these features as I recall from direct use.
Re: bluegriffon
On 12/4/14 8:52 PM, Yasha Karant wrote: > For specific uses, I need an application similar to Blue Griffon Two things, first is to try a slightly older version of BG to see if that fixes your problem. Second, the best alternative and cross platform is KompoZer (which is what BG was built from). http://www.kompozer.net/ You'll find RPMs on their website too. -- << MCT >> Michael C Tiernan xmpp:mtier...@mit.edu +1 (617) 324-9173 MIT - Laboratory for Nuclear Science - http://www.lns.mit.edu High Perf Research Computing Facility at The Bates Linear Accelerator Please avoid sending me MS-Word or MS-PowerPoint attachments. See http://www.gnu.org/philosophy/no-word-attachments.html
Re: Mate 1.8
The only documentation I can find for the dconf settings for Mate is what is available under "Description" when you click on a setting in dconf-editor. That is presumably at least accurate, even if you have to hunt around to find what you want. On 04/12/14 22:12, Yasha Karant wrote: Problem solved. Are the dconf-editor edited fields (variables) (well) documented anywhere? I did a web search on this issue and a found a reference that this had been solved in Mate 1.8 (at least on ubuntu). As I show my research students, a MS Win 8, Mac OS X, Gnome 3, or KDE Plasma interface is not as efficient as a Gnome 2 style interface for non-touch-screen machines; trackpads and touchscreens require ergonomic calibration that may be too sensitive for some hands/fingers. Mate is much better. Yasha On 12/03/2014 10:31 PM, Ben Waugh wrote: My understanding is that this bug is known to be present in MATE 1.8, but will be fixed in the next release: http://forums.mate-desktop.org/viewtopic.php?f=2&t=3274 Meanwhile, there is a workaround using dconf-editor: http://forums.mate-desktop.org/viewtopic.php?f=2&t=3274&sid=e98780617c56d376cadbc4c1af5f14e7&start=10#p10348 Cheers Ben On 04/12/14 05:29, Yasha Karant wrote: I understand that this is not an EPEL list. However, Mate is an EPEL port to EL7. I have been attempting to use Gnome 3, both Classic as well as Frippery; but I find that Gnome 3 lacks specific functionalities that I prefer. Evidently, Mate is a port/clone of Gnome 2 for distributions using Gnome 3, including EL7. I have installed Mate 1.8.1 as well as the applets, etc., from the EPEL list in the Add/Remove Software GUI. However, the window selector grid has a fixed 4 windows, and the right click Preferences on the selector does not allow me to increase the number of workspaces. A search on the web reveals that this is supposedly fixed in Mate 1.8 , but is not on my machine. Does anyone have a solution? Supposedly Oracle EL 7 uses Gnome 2. Is it possible to use the Oracle EL 7 rpms to install Gnome 2? Yasha Karant -- Dr Ben Waugh Tel. +44 (0)20 7679 7223 Computing and IT Manager Internal: 37223 Dept of Physics and Astronomy University College London London WC1E 6BT