General :: Text File Column Editing

Jul 17, 2011

I have 2 large text files , one looks like this:

<contact type="1">blahblah@hotmail.com</contact>
<contact type="1">blahblah2@hotmail.com</contact>
<contact type="1">blahblah3@hotmail.com</contact>

The other is a list of emails in single column format like this:

emailaddy@hotmail.com
emailaddy2@hotmail.com
emailaddy3@hotmail.com , etc

Is there a command to delete all the blahblah emails from text file 1 and replace them with the ones from text file 2?

Or maybe a linux version of 'Csved' which has the ability to add,remove,insert columns?

View 5 Replies


ADVERTISEMENT

Programming :: Add A Column To A Text File?

Apr 28, 2011

I have a text field that is just list of servers and I need to add the word hostname in front of them... It must be brain fart but I can't think of how to do this. Basically I need this:

server1
server2
server3

To this:

hostname server1
hostname server2
hostname server3

(And I just mean simply the word "hostname")

View 2 Replies View Related

Programming :: Importing MYSQL Table From Text File Wo Column Delimiters?

Jun 13, 2011

I am trying to import a data file from old DOS application into MYSQL table The file is clear text file with fixed-width columns, without column delimiters

Example file :
Code:
4444333666666
2222666555555
iiiiwwwcccccc

[Code]...

View 3 Replies View Related

Fedora :: Editing A 26 Gigabyte Text File?

Jul 15, 2009

I did a pg_dump of our data warehouse, and it is 26 gigabytes. I wanted to load this data into a different database product (one that forked from Postgresql, so its syntax is very similar).I needed to change the syntax of the "COPY" command in the pg_dump output, remove references to "public", and change the table owner name. sed did these for me (albeit slowly). The output from pg_dump is a file called "pg-dump-output.sql".

pg_dump produces this:
Code:
...

[code]...

View 4 Replies View Related

General :: Text Editing Remote Edit With Local Editor

May 26, 2010

I have a server I can ssh into, and I am also running Ubuntu. How do I edit this remote file using any program I have installed on my local Ubuntu, without copying it to local, editing it, and copying it back?

View 4 Replies View Related

General :: File Name In Separate Column?

Apr 26, 2010

I have some series of files, which actually named bellow

<day_month_yr>_<hh:mm:ss>.<host_name>.<IP.ip.ip.ip>.<log_name>.txt

I want to show this file name below the column may be

Date Time Host_Name IP_address Login_Name
----- ---- --------- ---------- ----------
<day_month_yr> <hh:mm:ss> host_name x.x.x.x log_name
...

View 5 Replies View Related

General :: Calculate 3rd Column Which Should Be Addition Of Value In 1 And 2nd Column?

Jul 19, 2010

How would i calculate following values.Initial file

10 3
20 4
How would i calculate 3rd column which should be addition of value in 1 and 2nd column.File after calculation
10 3 13
20 4 24

View 14 Replies View Related

Ubuntu :: Text Editor With Column Mode?

Sep 23, 2010

text editor that has column mode capabilities like UltraEdit?

View 5 Replies View Related

General :: Extract 5th Column From A File Without The Header?

Oct 15, 2010

How can I extract 5th column from a file without the header.

View 5 Replies View Related

General :: How To Redirect The Output To Different Column In .csv File?

Apr 25, 2011

I was trying to redirect the output of two variables to different columns of a .csv file in MS excel like this,

Code:
echo "$a $b" > abc.csv
But I am getting both $a and $b in the same column, is there anything I can use instead of to move the value of $b to the next column? Or is there a good different approach to do it?

View 2 Replies View Related

General :: Sorting A First Non-numerical Column In A File?

Jul 13, 2011

I have a file like:

ER- V67
ER+ V68
ER- V69
ER+ V70

[Code]....

I am using the code:

sort -k1

but it prints it by sorting the second column.

View 8 Replies View Related

General :: Recreating A Column Byte-based File?

Nov 5, 2009

I have a file that stores employee login IDs, names, types, and permissions. Our software reads the information based on byte-columns, so it reads a column as any ASCII character (spaces, letters, numbers, punctuation, etc.). I want to create a web-interface for adding and removing users, and storing the data in a MySQL database. However, if I am creating the files from the MySQL output, I need a way to write to specific column locations in the file ...

User ID: Columns 1-4
User Name: Columns 6-30
Type: 32-40
Permissions: 42-45

I want to use a scripting language, preferably C-Shell, to call MySQL for the data and write the data to the correct columns of the file. I wrote a script that takes the data from the file, and dumps it into the MySQL table, so maybe I can pad the remaining space in the table column to fill with spaces ...

View 12 Replies View Related

General :: Sort .txt File By The Numerical Order Of Column?

Mar 22, 2010

I have this .txt file

3183630 R
3574216 W
5264994 M
2656889 A

I want to sort it by the numerical order of column. After sort, I wish to get output like

2656889 A
3183630 R
3574216 W
5264994 M

anyone knows how to use sort to do that? or any other command?

View 6 Replies View Related

General :: Check Quality Of A Specific Column In A Tab-delimited File?

Mar 8, 2010

shell commands for such two goals?

In a tab-delimited file,

Code:
1aIa11aa
2bIIa22aa
1cIIIaabcaa
4dIVaabcaa

1. How can I find the non-unique values in the 1st column (1, in this case)?

2. How can I find the non-integer values in the 5th column (abc, in this case)?

View 3 Replies View Related

General :: Awk Gsub() Command - String (column) Manipulation - Replace The Value Of The $1 Column In The Awk Print String?

Mar 7, 2010

i use this script to get the time and date of back and fourth transactions for a particular execution id. I use a substr command on the 5th column to to cut the milli seconds off the time value. - otherwise the times would look like 08:30:04.235

grep <executionID> <auditfile> | awk '{ print $1, $2, $3, $4, substr($5,1,8}
FIX -> Mon 3/1/2010 08:30:04
FIX <- Mon 3/1/2010 08:32:36
FIX <- Mon 3/1/2010 08:35:08

[code].....

anyhow - i append two sed commands to further clarify the direction of the message.

awk '{ print $1, $2, $3, $4, substr($5,1,8} | sed -e 's/->/ ->IN/g' | sed -e 's/<-/<-OUT/g'
FIX -> IN Mon 3/1/2010 08:30:04
FIX <- OUT Mon 3/1/2010 08:32:36

[code]....

I tried using an awk gsub () command within the string instead of the two seds, but it did not work:

awk '{ print gsub(/<regex>/, <replace with>,$1), $2, $3, $4, substr($5,1,8}

the sed works ok, but it would be cooler to make the replacement within the awk command:

gsub(/->/,-> IN, $1)

Is there a way where i could replace the value of the $1 column in the awk print string?

View 1 Replies View Related

Programming :: Editing Text Using AWK?

Jan 11, 2010

Code:
echo -n "Title:"
read Title

[code]...

View 12 Replies View Related

General :: Editing A File Using Awk?

Apr 29, 2010

I have a list of millions of filename in form of say "drau3DDFEA5E01205841DC1B277A".
I need it convert it intousr/local/data/d/dr/dra/drau/drau3DDFEA5E01205841DC1B277AI believe that can be achieved by awk or sed.

View 1 Replies View Related

General :: Replace Text In One File With Text From Another File Using Sed?

Apr 28, 2010

How could I replace text in one file with text from another file using sed?

The text in each of the files would be surrounded by a starting and ending delimiter or a starting tag, say like /* */ so to easily find them.

View 8 Replies View Related

General :: Editing A Boot File

May 4, 2010

I have samsung laptop and there is a nasty program called samsung recovery solution that changes the active partition to Windows each time you enter it. The trouble is: I have 2 OSes, Opensuse and Windows 7, and Grub that is installed in my Extended partition, so each time I enter this recovery program active flag is changed and Windows is loaded instead of grub. I have noticed some boot files in that program's folder, so the question is how can I edit them in most convenient manner? I have kde 4.5.3 is there some sort of included program that would help?

View 6 Replies View Related

General :: How To Get Color While Editing File Through SSH Session

Nov 25, 2010

I use cygwin on Windows7 to open a ssh session to my linux box. When I edit a file with vim, I don't have color, only kind of gray bold. I have colors when I do a ls into my ssh session. I have also colors when I edit files from a ssh session from my linux box to my linux box. I modified the shortcut on Window7 to run cygwin in 256 colors, no effect. Do I need to set an environment variable on my cygwin session ?
On Cygwin and On Fedora when "sshed" from Gygwin : TERM=cygwin

View 2 Replies View Related

General :: Editing A File As Root In Debian

Mar 16, 2010

But any changes I make cannot be saved unless I'm in root. I might be doing this wrong, but I cannot log into root or figure out how to open this file as the root user. I'm still somewhat new to Linux, so could someone please give me an idiot-friendly step-by-step of what to do to open, edit, and save this file as a root user?

View 3 Replies View Related

General :: Editing Inittab File From Grub?

Jul 27, 2010

During my several experiment on linux I accidentally put the default runlevel to the value 6..thus before starting its going to restart ..currently running mint 9. there is only one way that somehow i can edit that file from grub command line.

View 4 Replies View Related

Debian Multimedia :: Scribus Crash When Editing Text

Jul 20, 2015

I use Scribus 1.4.4 without any changes from the Debian stable repository.

Each time when I edit text in the layout mode (not in the text editor) the program crashes with a "signal #11" message:

Code: Select all$ scribus
TIFFFetchNormalTag: Warning, Incompatible type for "RichTIFFIPTC"; tag ignored.
TIFFFetchNormalTag: Warning, Incompatible type for "RichTIFFIPTC"; tag ignored.
TIFFFetchNormalTag: Warning, Incompatible type for "RichTIFFIPTC"; tag ignored.
TIFFFetchNormalTag: Warning, Incompatible type for "RichTIFFIPTC"; tag ignored.
Scribus Crash
-------------
Scribus crashes due to Signal #11
Calling Emergency Save
Segmentation fault

On Wheezy I was using Scribus also, but without such problems. Unfortunately I often need to use the text editing in the layout mode in order to adjust the text flow for the final layout.

View 2 Replies View Related

Ubuntu Multimedia :: Video Editing / Text And Reverse

Apr 9, 2010

I'm trying to reverse a clip in kdenlive and add text on top of the moving clip, but cannot figure out how to do it..anyone know how or a program that can?

View 2 Replies View Related

Programming :: Editing Text Files With Information From PostgreSQL DB?

May 16, 2011

Is there any way to edit text files with information in a database? The file is supposed to be always the same.. the information is going to be addedd in a specific format

View 2 Replies View Related

General :: Cannot Find Specific Glibc Tar File For Editing?

Feb 3, 2011

I have the tar file of glibc-2.12.1, but now I want to edit the SPEC file. I can't find it. For those that want a "why", I'm trying to make it smaller. So simply, where is the SPEC file for glibc? (rpmbuild cannot find it in the *.tar.gz file).

View 4 Replies View Related

Ubuntu :: Sort The Output To A Text File So That It Prints To The Text File At 1 Process Per Line?

Feb 6, 2011

im trying to output a list of running processes via a shell script. At the moment i got this which outputs the processes to a text file called out.

echo $(ps aux) >>out

The problem is though, the processes are all just one big block of text which makes it hard to read. Does anyone know how to sort the output to a text file so that it prints to the text file at 1 process per line? I know its probably simple but im very new to linux.

View 5 Replies View Related

General :: Boosting Application Performance By Editing Kernel File?

Jun 15, 2010

which file is edited of kernel for boosting the application performance at boot

View 2 Replies View Related

General :: Image Editing (have To Increase A File Size To Just 1 Kb) In Ubuntu

Jul 25, 2011

i have to upload a signature image(in jpeg format) to fill a recruitment form which says file-size must be of between 10-20 kb......i have scanned image which is of 9.5 kb.....tried to edit in shotwell photo manager....tried some random things in Adjust and crop menu but my little changes didn't work, it always shortened the file size......as i don't know anything about Image editing can someone tell me how can i increase the file size (>=10kb) i also tried gnome-screenshot to take the screenshot of the image, but it also saved the new image smaller than 10kb....

View 6 Replies View Related

Debian Multimedia :: Scribus Crashes When Editing Text In Layout Mode

Sep 29, 2015

I use Scribus for designing leaflets and broshures. Unfortunately with the most recent version in the stable branch the program crashes each time I try to edit text in layout mode. I didn't have this problem in older versions. So I wonder if this is a bug others noticed in Scribus 1.4.4 on Debian GNU/Linux 8 (jessie) 32-bit.

For normal text editing I use the text edit mode anyway but when I try to fix line breaks it's always hard to not instantly see what I am doing. So even if I just want to insert a single character the program crashes with the following message: Scribus crashes due to Signal #11

View 3 Replies View Related







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