General :: Text Manipulation Using Sed - Convert The Characters

May 7, 2010

I have a number of text files (26 per database x 100+ databases) which need 'correcting' in order to import into postgresql. I think that I have identified all the problem characters and I need to automate the process as much as possible. I have a script to convert the characters and I do them one by one (not effecient but easier to understand).

[Code].....

View 2 Replies


ADVERTISEMENT

General :: Text Manipulation Find / Replace Variable Efficiency?

Aug 27, 2010

What I have works, but wondering what is the 'right' way to replace the digits with the letters given in this loop? somehow use a case or multiple sed? i thought of a multiple sed or a case but couldn't get it to work

Code:

# ...
bcv=$(echo $line | awk -F" " '{ print $1 }' | sed 's/1/q/g;s/2/w/g;s/3/e/g') # and so on

Code:

while read line
do
bcv=$(echo $line | awk -F" " '{ print $1 }')
if [ $bcv == "" ]

[code].....

View 12 Replies View Related

Ubuntu :: Text Manipulation - Regex - Pattern Matching?

Jul 12, 2010

Are there some good tutorials or reference materials on how do pattern matching and text manipulation in Linux?I have a few simple tasks I'd like taken care of...like formatting numbers in file names, stripping some text from directory names, etc

View 2 Replies View Related

Programming :: Text Manipulation With Bash For Snort Alert

Nov 26, 2010

I have a little problem about string in Snort alerting. I understood about Snort alerting saved in /var/log/snort/alert and Snort will add a new entry if there was a attack from anywhere. Then here's my problem. Because it has a lot of file on it, all I want to do is parse that string in snort alert then make into simply log files with it. I'm getting confused with Snort alert and parse that file.

Here's the simple algorithm; Snort get the alert <- parse the alert with my parameter which I've configured with bash (ip address, dest, kind of attack and time) <- then sent that parse alert into new text (let's called snortsent.txt) <- after ten alerts then clear the text then waiting again until the Snort alert go on -> back to snort alert. Here's the sample of my snort alert: (/var/log/snort/alert)

[Code]....

View 16 Replies View Related

General :: Convert Shell Logs - Incl. Escape Characters - To HTML?

Mar 6, 2010

Is there tool or a regexp that can convert shell escape characters to HTML code?

As an example, here is a logfile from GNU screen:

Which I would like to convert to something like this:

And send as HTML e-mail to an e-mail address, to archive my work.

Here is a related question, which shows how to convert it to regular text, but it would be nice to convert to HTML and not just throw the escape characters away.

View 1 Replies View Related

Fedora :: Text File Manipulation With Standard Commands In BASH - Remove The Stock Code

Oct 10, 2009

I need to do some text file manipulation which I think should be done with standard commands in BASH. I'm looking at comma seperated text files (stock market data). It comes in the form of date, stock code, open, high, low, close, volume. What I need to do first is move all data with same stock code sequentially into individual files.

While doing this since the stock code will now be the file name I need to remove the stock code. Next I need to filter out overlapping data from different files with the same date. ie. where two files contain the same date on the one line only one line will be added to the combined file. I think there must be a tutorial out there for basic text manipulation like this, I just haven't found it yet.

View 11 Replies View Related

General :: Cups Generic Text Only Doesn't Print 255 Characters?

Dec 26, 2010

I configured cups and I managed to print successfully with generic text only but my problem is that the printout always comes out as 80 columns. anything more than 80 colums wraps on the next page. I tried changing the pagesize at the textonly.ppd but it didn't work.my textonly.ppd is

*PPD-Adobe: "4.3"
*%
*% Text-only printer definition

[code]...

View 1 Replies View Related

General :: Convert Text To ASCII?

May 20, 2010

how i can convert a text to ASCII? >>> ( to encrypt the text ) and how can we use the "hexdump"

View 5 Replies View Related

General :: Failed To Convert Text To Html

Jun 15, 2010

I need to convert a very large latex project (made up of many .tex and style files) into .html (or something similarly non-.pdf). Can someone recommend a quality converter program? Preferably, one that is:

[Code]....

View 1 Replies View Related

General :: Convert Text Files Between Windows(Dos)?

Jan 24, 2010

What is a good way to do it? I have been trying to do it using sed.

View 9 Replies View Related

General :: Convert Pdf File To Text Format In 4.7?

Dec 27, 2010

I have an pdf file on my linux RHEL 4.7 machine. I can open that file but when i click on 'saveas' to save the file in 'Text' format there are no options i see there. I need to save the 'pdf' file to 'text' format. could anyone tell me how to save the pdf file to Text format. Iam using 'KDE'

View 6 Replies View Related

General :: How To Convert A Simplte Text File Into Csv Using Awk Script?

Sep 14, 2010

i am collecting usb usage details of all users and convert it into csv files so that i can export it into some database..the output desirable is in csv format for database with some batch or awk script.

View 1 Replies View Related

General :: Convert Binary Number To Text/ascii?

Mar 16, 2011

is there command in linux which is able to convert binary (0101001010000100) to text like it means something

View 4 Replies View Related

General :: Convert A Text File From Shift JIS To UTF-8 And Back From The Terminal?

Jul 21, 2011

In order to make this conversion I have to use a text editor. This is tedious. Is there an easier way to do it, like some program I can run from the Linux or OSX terminal?

View 1 Replies View Related

General :: Convert A Windows Like Text File Into *nix Like Utf-8 Encoding Automately?

Mar 23, 2011

I want to convert many text files(copied from windows workstation) into utf-8 encoding file. Yes, iconv is available for it. However, I have to give source file encoding at the command line parameters! The problem is, at most case, I am not sure the source encoding of it. And, I also want to use a script to convert many files recursively.

View 2 Replies View Related

General :: Convert The Core Dump To A Readable Text File?

Nov 12, 2009

i just touch linux, may i know how can i convert the core dump file to a readable textfile, which include all the information, which is in core dump, such as all variables, threads information, call trace for each tasks, and so on. i know use the GDB can view this, but it won't dump all the informations to one text file. but sometimes, people want to view the core dump reason without Linux environment.

View 2 Replies View Related

General :: Convert A Large Number Of File Types From None Standard To Text?

Sep 28, 2009

I have on my windows machine several hundred files that are a format of .nc .ncs for a CNC machine. I need to convert them to txt which is something as easy as opening in notepad and then saving as .txt but there are so many that this kind of action would take way too long.

The reason I am writing the linuxquestions is because I would feel more comfortable in loading a live CD and using some sort of terminal command to do this than I would to download one of the many "freeware" type programs I have found for windows (even more so since I have had a root kit before and had to start all the way over to get rid of it).

I need to know:

1. Is this possible to do with the terminal without super advanced knowledge.

2. Can one please point me in the right direction; something to read or an example

View 2 Replies View Related

General :: Cross-platform / Command Line Utilities To Convert PDF / DOC And DOCX To Text

Jul 28, 2011

I am making a text search engine. I need to first convert binary documents to text. I want to go with cross-platform (we develop both on windows and linux) command line (so that I can get the output via python subprocess). What are the choices for this?

View 1 Replies View Related

General :: Vim - Text Files On Linux Have "<97>" Characters?

Apr 28, 2010

When viewing a particular text file in vim or less on Linux or OS X, all the en dashes show up as highlighted "<97>" characters.What control-sequence do I need to type in order to substitute the hyphens back? For example, the following doesn't work in vim:% s/<97>/--/gTyping bracket nine seven bracket is not the same as typing the actual special character.

View 2 Replies View Related

General :: Change A Specific Characters To Capital In A Specific Text?

Dec 2, 2010

for example

else {
for fileDOC in $location/*.doc
do

[code]...

View 12 Replies View Related

Software :: Perl Program Can't Convert A Csv File (with Japanese Characters) / What To Do?

Jan 20, 2011

I use the below perl program csv2xls.pl can convert a csv to xls file , it works fine , but I found that it only work for all English characters , I tried to use it to convert a csv file ( with Japanese characters ) , it does work , I also tried the perl "unicode_utf16_japan.pl" , it also did not work , can advise what can i do ?

View 13 Replies View Related

Programming :: PHP - Show Text Between Two Characters?

Dec 1, 2010

I wish to show text between two characters with PHP. Here is some example text:

<p class="abc">My</p>
<table border="1">
<tr><td>name</td><td>is</td></tr>

[code]...

View 4 Replies View Related

Ubuntu :: Some Japanese Text Comes Out As Garbage Characters

Jan 23, 2010

I have installed scim and anthy. Most Japanese characters display, but some websites and files show garbage characters. Is there any way to resolve this?

View 1 Replies View Related

Ubuntu :: Some Japanese Text Comes Out As Garbage Characters?

Nov 1, 2010

I have installed scim and anthy. Most Japanese characters display, but some websites and files show garbage characters.

View 1 Replies View Related

General :: Does Non-printing Characters Escape Characters Still Needed For PS1 Definition?

Aug 28, 2011

While modifying the definition of my PS1, I saw that "[" and "]" markers should be added to help bash to compute the right display lenght. Many exemples on the web do not use them or even mention them.I searched for a solution to add them automatically, like with sed, but I didn't find any example.Are they still needed and is there a recommandation not to use sed to define PS1?

View 1 Replies View Related

Debian Configuration :: CUPS PDF - Strange Characters In Text

Apr 18, 2016

I can't find the reason cups pdf driver do this. I created my default printer as is told:

CUPS PDF--> Generic Printer--> Generic CUPS-PDF Printer

The pdf created shows well, but when i drag to select and copy text, it copies some strange characters as following:

✁✂✂✄
☎✆✝✞✟✟✝✆✠✡☛ ☞✌☛✍✡✎ ✏ ☛✄✑✄ ✎✞✟✄✂✒✞✓ ✔✁✓✁ ✕✖✞✑✗✓✞ ✍✁✂✂✄
☎✆✝✞✟✟✝✆✜✁ ✢✖✟✝✖✛✁ ✘✞✂ ✘✖✣✞✓✄ ✏ ✤✁✛✥ ✜✁✦✟✄✣☎✘✄✛
✁✂✂✄
☎✆✝✞✟✟✝✆✕✞✛✓✞✝✄✟ ✘✞ ✙✣✁ ✑✞✣✝✞ ✖✣✝✞✂✖✧✞✣✝✞★ ✍✞✛✣✖✛✁✂✂✄

View 3 Replies View Related

Ubuntu :: Text Characters Replaced By Little Rectangles In Openoffice?

Feb 25, 2010

i have a problem, when i open OO, the text of the menus is replaced by little rectangles.

For example, instead of:

File Edit View etc..

(they look more like rectangles than squares) i also have this problem with drop down menus, font names, font styles and even with the numbers on the ruler.

Ubuntu 9.10, OO 3.1

View 9 Replies View Related

Ubuntu :: Script To Replace Characters In Text File?

Jun 30, 2011

I have an odd request, lets say I have a text file like this:

Quote:

Code:

__##___##___IIIIII
__##___##_____II__
__##___##_____II__
__#######_____II__
__##___##_____II__
__##___##_____II__
__##___##___IIIIII

I want a script that will replace all of the hash tabs with random characters.I found this command will generate a random character

Quote:

apg -a1 -n1 -m1 -x1 -d

how to script a search and replace using that random character upon each successive find until the end of file occurs.

View 9 Replies View Related

General :: Convert An HTML Email Saved As A Text File To A PDF File From The Command Line?

Aug 23, 2011

I need to be able to convert HTML email messages saved as text files (.eml or .msg) to PDF documents, one PDF per email, retaining formatting and images.

Are there any Linux tools that will allow me to do this from the command line (so it can be scripted)?

View 1 Replies View Related

OpenSUSE :: Weird Characters And Missing Texts - Don't Show Any Text At All But Squares Instead

May 22, 2011

I am using a VRS for ftp operations. I have bought it with OpenSuSe 11.3 installed without any Control Panel installed. I have used NX and installed IceWM as windows manager. It works really great. Then system wanted me to upgrade. I did so. After upgrade to 11.4, my programs screwed up. They don't show any text at all but squares instead. I have tried everything i know to fix this but i could not manage to repair it.

My VRS has 512mb RAM , OpenSuse 11.4 (32-Bit) and has no control panel. I use yast through SSH Telnet client (Putty).

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved