Operating System: CentOS 5.4 I have a bash script that runs another php script to return a decrypted password. The return value is right but when I concatenate it with another string, I would not have the whole string. To better understand the problem, here is my script:
I want to match some filename in some text, but the filenames I have no control of, so "[" can "]" can appear in the filenames.so do I always have to use sed to addslashes to these variables before I have to grep them? and what other characters have I missed other than "[", "]", "."?
we have Centos linux and database postgresql and taking dump in .data files. need to find all speical character in my database dump .data files it is open in txt paid and store in one txt file. e.g of special character are as below.
I have two systems at hand. One a Debian box, the other a RHEL5 box. On the Debian box there is a MySQL server (5.0.32-Debian_7etch1) running which hosts Databases from a customized content management system. This system has grown over time and the tables are stored with different collations. Now I want to export and reimport the data on the RHEL5 MysQL server (5.0.45).
And here the special character hell begins. It doesn't matter if I reimport the data as utf8, as latin1 or latin1_swedish_ci. Everytime the special characters are wrong and distorted. Surprisingly the data that is shipped with the unmodified CMS displays the special chars correctly after installation. But I have to import the modified version from the old server as there are lots of modifications to import.
Old server:
Quote:
character set client utf8 (Global value) latin1 character set connection utf8
[code]....
New server:
Quote:
character set client utf8 (Global value) latin1 character set connection utf8
I am having difficulty getting sed to replace a string of text in an XML file, despite the fact that I have no trouble using grep to find that same string. Since the new string and old string to be replaced contain a lot of special characters, I thought it best to store them in variables as opposed to using a slew of backslashes:
But the problem is that in this case i just wanted to append "/home/dest" for which I could easily escape "/" with just two "", but I wonder if i have a long path like "/a/b/c/d/e/f/g/h/i/j" I will have to escape so many /. Is there any other way by which I can avoid escaping forward slash.
I tried following:
But receiving follo error
Bareword found where operator expected at -e line 1, near "s/destination-path=/'destination-path=/home" syntax error at -e line 1, near "s/destination-path=/'destination-path=/home" Bad name after dest' at -e line 1. tried with enclosing in double quotes as well but in vain
This is what i doing to remove ( and ) sed 's/(//'|sed 's/)//') Can you offer me some better sed code that remove ( and ) with blank without using pipe (|) . I mean sed code that check ( or ) and replace that with blank character.
I have a CSV file with 8 columns. I want to check the 5th column, which will contain a single capitalised letter. If that letter is say "B" I would then like to replace the 2nd column in the csv with an incremental number starting at 0 (basically a count) with a prefix of B (B0000001) Sample row would be:
I am bouncing a file across platforms (windows->solaris->mainframe), and the file is starting out with a "special" character (the registered trademark "circle R") in some of the records. This character is not in the EBCDIC character set on the MF, so it is unrecognizable. The MF developer I am working with asked if it is possible to replace the character with a specific hex value (AF) before it gets to the MF.
I was putzing around with sed, tr, etc. on the ksh command line, hoping to find an easy way to get one of them to substitute hex instead of ASCII. I have found that the usual shell utilities recognize the trademark character, so homing in on what to replace is solved. But I cannot get anything to actually substitute in the hex sequence I want. E.g. I was thinking something like...
>cat special_file | sed 's/R/AF/g'
But my version of sed does not seem to have hex "editing" capability.
I have to enhance the behaviour of a backup script written in perl. I don't need to change it, what I need to do is to create a bash script that does some checks like file name and file size, execute the backup script then check if the backup files match the original files.Here's how I try to do it:
- read the files from the original files folder - store them in an array - search in the array the files that have a specific file extension - store the file names that match the search pattern (I know the backup script skips some files so I can hardcode the search pattern) - run the backup script - read the files from the backup folder - store them in an array - compare the original files name and size stored in an array with those from the backup folder - send a report email
I want to use SED to do the following: In a text file replace any occurrences of the three character string ZZZ with a quotation mark "and. replace all occurrences of a comma with a semi-colon. It is the S/ / / command which is stumping me on the first issue...inparticular how to get the replace string to be quote.
I would like to know what shell command I could use for finding a phrase (which is a URL) in many files, with a different phrase. I have tried the "sed" command, but it does not like the forward slash.
I was messing around with the alternate character panel app and made a custom character set. I then wanted to put it on a new panel and created a new panel. I moved the character set to that panel, and then started to mess around with the panel settings (auto hide, show hide buttons, and expand, to be specific.) So far so good, until I moved the panel from the right side of the screen to the top. I already had a panel here, and it seemed not to like hiding a panel when there was already one on the top.
When the new panel hid itself, all my panels stopped responding (any clicks on them did nothing) and my processor started going at 100%. I tried a reboot and the only thing that changed is that now I can't even see my panels. I'm guessing I need to change the settings back manually through the prompt, but I don't know how to do that. I am using 10.04 and have not upgraded gnome since upgrading to 10.04.
I am trying to type German Umlaut letters on an English keyboard using kde 4.4. For some reason I seem unable to figure out how to do that (I have just recently switched to kde, was using gnome before). I have looked through various threads and the kubuntu wiki [URL], but can't get the compose key to work. In gnome I used to type "AltGr" plus "[" followed by a vowel and thus get my Umlaut - before I fiddled with the system settings this worked in kde, but only in firefox & Open Office (I assume they are gtk apps).
Since it did not work in Kmail, I went to the system settings, set up a ComposeKey (AltGr, but also tried rightWin), but it doesn't change anything for the kde applications. It only means that the old key-combination now stopped working in firefox and OO. In the system setting of kde 4.4 I can't see the options to enable xkb-options, but I assume the advanced options of the keyboard layout are xkb-options of previous kde releases. I unticked the box 'reset old options', but nothing changed. I type a lot of German text, so using a character map is not an option.
Just a small issue:I have a note in Tomboy called "Today's tasks".When I access the synchronised note on Ubuntu One, in the tabbed view it is called:"Today's tasks"Perhaps someone working on this would like to investigate it.
Uh why does Ubuntu 10.04.1 x86 run like dog **** on USB flash? Heres what happens, system runs for 10 seconds, freezes for 5, on and on and on, its horrible and basically a useless install, an endless loop of frustration and system halts.. Is there a special distro or version for USB installs?
Coz installing off the 10.04 cd directly to a 4gb U3 USB stick runs like a DOG POO! Yes its USB 2.0, and it should not be doing this, I almost went apeshit insane that after a 2 hour install process, thats the results I got. Celeron D 2.8ghz/512mb ram, no hard disk, U3 4gb USB 2.0. Im running puppy linux now and I have no hard disks, and since Ubuntu is clearly superior, would be nice to know what Im missing here or of this is a bug specific to my platform.
This morning I created a panel on the left side of my screen and I set it to auto hide. The problem is, now that it auto hides I can no longer get it to reappear again. Because I can't, my special effects do not work (cube). Is there a way to delete this panel if I can't get it to reappear again?
Would it be possible to make a launcher that checks if a tab with a specified address is open and if it is just opens the browser with the tab selected... if not opens a new tab with the specified address?Not sure if checking chromiums open tabs is possible... maybe this would need a extension of some sort!
I'm in the process of moving /tmp out of the root filesystem to it's own (larger) partition. From a LiveCD I've:
1. Created the new part (ext4 format and is /dev/sda4) 2. Mounted the installed OS root filesystem (/dev/sda1) as /slash 3. Mounted /dev/sda4 as /newtmp 4. Using gksudo nautilus I'm trying to copy the contents of /slash/tmp to /newtmp
I have 4 files that won't copy - returning the error "Can't copy special files". These are related to ORBit it seems:
[code]...
Questions are: a. Will GDM or ORBit fail if I start up without these? b. Or will they just be recreated on the fly if found to be missing? c. What's the best way to proceed?
I have recently switched to Ubuntu from Windows Vista. But I am having a few problems, any pointers will be grand.First sleep and hibernate do not work. My laptop sleeps or hibernates fine, but on awake I just get a blank screen and the hard drive doesn't spin at all. This also disables the network manager, which is a real pain.Also for some reason I can't enable special effects. I have the ATI Radeon 200M series integrated graphics chipset.eres some spec details:
I have played around a bit with the Open Shot Video Editor and just download Kdenlive. I am trying to teach myself how to create and edit videos by inserting music, transitions, etc. However, I want to add special effects such as fireworks, explosions, get text to light up, blur, etc, and add sparkle type effects. I know Open Shot won't do this and it does not look likve Kdenlive will either. Trying to find something that will jazz my videos and almost give them a semi professional quality to them. Is there any other Open Source video editor type program that can do special effects like what I am looking for?