Sponsored Content
Top Forums Shell Programming and Scripting comparing files - adding/subtracting/formating columns Post 302204751 by vakharia Mahesh on Thursday 12th of June 2008 12:07:36 PM
Old 06-12-2008
MySQL Comparing Files

Just now I have written the reply but appers no where,

Dear Radlouv
Bundles of Thanks to you for explaining the code in very simple term .
No way , but SIMPLY SUPERB .No word will suffice . Knowing is something
but to explain in simple wrods requires great insite .

Thanx once again. Cheers Up.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Comparing Columns of two FIles

Dear all, I have two files in UNIX File1 and File2 as below: File1: 1,1234,.,67.897,,0 1,4134,.,87.97,,4 0,1564,.,97.8,,1 File2: 2,8798,.,67.897,,0 2,8879,.,77.97,,4 0,1564,.,97.8,,1 I want to do the following: (1) Make sure that both the files have equal number of columns and if... (1 Reply)
Discussion started by: ggopal
1 Replies

2. Shell Programming and Scripting

Comparing Columns of two FIles

Dear all, I have two files in UNIX File1 and File2 as below: File1: 1,1234,.,67.897,,0 1,4134,.,87.97,,4 0,1564,.,97.8,,1 File2: 2,8798,.,67.897,,0 2,8879,.,77.97,,4 0,1564,.,97.8,,1 I want to do the following: (1) Make sure that both the files have equal number of columns and if... (4 Replies)
Discussion started by: ggopal
4 Replies

3. Shell Programming and Scripting

comparing the columns in two files

I have two files file1 and file 2 both are having multiple coloumns.i want to select only two columns. i used following code to get the desired columns,with ',' as delimiter cut -d ',' -f 1,2 file1 | sort > file1.new cut -d ',' -f 1,2 file2 | sort > file2.new I want to get the coloums... (1 Reply)
Discussion started by: bab123
1 Replies

4. Shell Programming and Scripting

comparing 2 columns from 2 files

Hey, I have 2 files that have a name and then a number: File 1: dog 21 dog 24 cat 33 cat 27 dog 76 cat 65 File 2: dog 109 dog 248 cat 323 cat 207 cat 66 (2 Replies)
Discussion started by: dcfargo
2 Replies

5. UNIX for Dummies Questions & Answers

Comparing columns in two files

Hi, I have two files. File1.txt has 2 columns and looks like: 458739 122345 4456 122657 34200 122600 File2.txt has many columns with column 1 the same as column2 of File1.txt, but with lot more rows: 122786 abcdefg user1@email 122778 uuhjeufh user2@email... (1 Reply)
Discussion started by: ursaan
1 Replies

6. Shell Programming and Scripting

comparing two columns from two different files

Hello, I have two files as 1.txt and 2.txt with number as columns. 1.txt 0 53.7988 1 -30.0859 2 20.1632 3 14.2135 4 14.6366 5 -37.6258 . . . 31608 -8.57333 31609 -2.58554 31610 -24.2857 2.txt (1 Reply)
Discussion started by: AKD
1 Replies

7. Shell Programming and Scripting

Comparing two columns from two different files

Hi, I have a single-column file1 having records like: 00AB01/11 43TG22/00 78RC09/34 ...... ...... and a second file , file 2 having two columns like 78RC09/34 1 45FD11/11 2 00AB01/11 3 43TG22/00 4 ...... ...... (8 Replies)
Discussion started by: amarn
8 Replies

8. Shell Programming and Scripting

Adding/ Subtracting from Date

Hi , How can I add/substruct x number of days with date? For example My_Date=`date` Now I need Hope it's clear. (2 Replies)
Discussion started by: Anupam_Halder
2 Replies

9. Shell Programming and Scripting

awk - Adding and Subtracting Numbers from 2 Columns

Hi Folks, I have a file with 2 columns TAB delimited and I want to add '1' to the first column and subtract '-1' from the second column. What I have tried so far is; awk -F"\t" '{ $1-=1;$2+=1}1' OFS='\t' file File 0623 0623 0624 0624 0643 0643 1059 1037 1037 1037 1038 1038... (2 Replies)
Discussion started by: pshields1984
2 Replies

10. Shell Programming and Scripting

Adding columns from 2 files with variable number of columns

I have two files, file1 and file2 who have identical number of rows and columns. However, the script is supposed to be used for for different files and I cannot know the format in advance. Also, the number of columns changes within the file, some rows have more and some less columns (they are... (13 Replies)
Discussion started by: maya3
13 Replies
BATTLESTAR(6)							   Games Manual 						     BATTLESTAR(6)

NAME
battlestar - a tropical adventure game SYNOPSIS
battlestar [ -r (recover a saved game) ] DESCRIPTION
Battlestar is an adventure game in the classic style. However, It's slightly less of a puzzle and more a game of exploration. There are a few magical words in the game, but on the whole, simple English should suffice to make one's desires understandable to the parser. THE SETTING
In the days before the darkness came, when battlestars ruled the heavens... Three He made and gave them to His daughters, Beautiful nymphs, the goddesses of the waters. One to bring good luck and simple feats of wonder, Two to wash the lands and churn the waves asunder, Three to rule the world and purge the skies with thunder. In those times great wizards were known and their powers were beyond belief. They could take any object from thin air, and, uttering the word In those times men were known for their lust of gold and desire to wear fine weapons. Swords and coats of mail were fashioned that could withstand a laser blast. But when the darkness fell, the rightful reigns were toppled. Swords and helms and heads of state went rolling across the grass. The entire fleet of battlestars was reduced to a single ship. SAMPLE COMMANDS
take --- take an object drop --- drop an object wear --- wear an object you are holding draw --- carry an object you are wearing puton --- take an object and wear it take off -- draw an object and drop it throw <object> <direction> ! <shell esc> IMPLIED OBJECTS
>-: take watermellon watermellon: Taken. >-: eat watermellon: Eaten. >-: take knife and sword and apple, drop all knife: Taken. broadsword: Taken. apple: Taken. knife: Dropped. broadsword: Dropped. apple: Dropped. >-: get knife: Taken. Notice that the "shadow" of the next word stays around if you want to take advantage of it. That is, saying "take knife" and then "drop" will drop the knife you just took. SCORE &; INVEN The two commands "score" and "inven" will print out your current status in the game. SAVING A GAME
The command "save" will save your game in a file called "Bstar." You can recover a saved game by using the "-r" option when you start up the game. DIRECTIONS
The compass directions N, S, E, and W can be used if you have a compass. If you don't have a compass, you'll have to say R, L, A, or B, which stand for Right, Left, Ahead, and Back. Directions printed in room descriptions are always printed in R, L, A, & B relative direc- tions. HISTORY
I wrote Battlestar in 1979 in order to experiment with the niceties of the C Language. Most interesting things that happen in the game are hardwired into the code, so don't send me any hate mail about it! Instead, enjoy art for art's sake! AUTHOR
David Riggle INSPIRATION &; ASSISTANCE Chris Guthrie Peter Da Silva Kevin Brown Edward Wang Ken Arnold & Company BUGS
Countless. FAN MAIL
Send to edward%ucbarpa@Berkeley.arpa, chris%ucbcory@berkeley.arpa, riggle.pa@xerox.arpa. 4th Berkeley Distribution BATTLESTAR(6)
All times are GMT -4. The time now is 11:29 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy