05-31-2013
obviously, i dont know what i am doing. when i execute that command; it just displays the output on the screen as it runs thru each record, but doens't make the changes to the file?
10 More Discussions You Might Find Interesting
1. Ubuntu
Hello,
I have a 1.6 GB file that I would like to modify by matching some ids in col1 with the ids in col 1 of file2.txt and save the results into a 3rd file.
For example:
File 1 has 1411 rows, I ignore how many columns it has (thousands)
File 2 has 311 rows, 1 column
Would like to... (7 Replies)
Discussion started by: sogi
7 Replies
2. UNIX for Dummies Questions & Answers
I have file with multiple columns. Column values for a record may be same.
Now i have to replace a column value(this can be same for the other columns) with new value.
File.txt
A,B,C,D,A,B,C,D,A,B,C,D
A,B,C,D,A,B,C,D,A,B,C,D
A,B,C,D,A,B,C,D,A,B,C,D
A,B,C,D,A,B,C,D,A,B,C,D... (1 Reply)
Discussion started by: ksailesh
1 Replies
3. Shell Programming and Scripting
Hi Friends,
This is the only solution to my task. So, any help is highly appreciated.
I have a file
cat input1.bed
chr1 100 200 abc
chr1 120 300 def
chr1 145 226 ghi
chr2 567 600 unix
Now, I have another file by name
input2.bed (This file is a binary file not readable by the... (7 Replies)
Discussion started by: jacobs.smith
7 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I am a newbie to awk. Here is my problem. Looking for an awk 1-liner to solve it:
My Computing Environment:
- Solaris10
- I prefer to use csh or sh shells
1. Lets say my input file is File1.dat (delimter = | ) and looks as follows:
(File1.dat)
... (1 Reply)
Discussion started by: andy b
1 Replies
5. Shell Programming and Scripting
Hello,
I want to Replace/Remove ^M and the new line that follows it in a delimited file.
So far I have tried following and nothing seems to work for me .
Tr –d ‘\r\n’ < old.dat > new.dat -removes all the linefeed, not just the ones after a ^M.
Sed ‘/^M$/{N; s/.\n//;}’ < old.dat >... (7 Replies)
Discussion started by: bluestarmoon
7 Replies
6. UNIX for Dummies Questions & Answers
I have a file like this.
It is tab delimited.
Unfortunately, the missing data was filled in with a period "." (see the leading lines 1-5 columns)
I want to substitute the periods for misisng data with an integer "-999".
however, I do not want the global replace to change the other periods seen... (7 Replies)
Discussion started by: genehunter
7 Replies
7. Shell Programming and Scripting
Hi,
I have the requirement similar to the one mentioned in the below thread.
https://www.unix.com/unix-for-dummies-questions-and-answers/128155-search-replace-string-only-particular-column-delimited-file.html
The only difference is that I need to change the field for row 1,2 and the last... (14 Replies)
Discussion started by: chetanojha
14 Replies
8. Shell Programming and Scripting
Hi all,
I am fairly new to UNIX and I was wondering if you could provide me with some help! Lets say i have a file as below :
Line 1
Line 2
Line 3
ABC|12|4|2
Now the number 4 in bold, this number will represent the number of row there is in the file excluding the header and footer... (10 Replies)
Discussion started by: Stinza
10 Replies
9. UNIX for Beginners Questions & Answers
Hello Everyone..
I want to replace the retail col from FileI with cstp1 col from FileP if the strpno matches in both files
FileP.txt
... (2 Replies)
Discussion started by: YogeshG
2 Replies
10. Shell Programming and Scripting
I have an input file as below
Emp1|FirstName|MiddleName|LastName|Address|Pincode|PhoneNumber
1234|FirstName1|MiddleName2|LastName3| Add1 || ADD2|123|000000000
Output :
1234|FirstName1|MiddleName2|LastName3| Add1 ,, ADD2|123|000000000
OR
1234,FirstName1,MiddleName2,LastName3, Add1 ||... (2 Replies)
Discussion started by: styris
2 Replies
trans(1int) trans(1int)
Name
trans - translation tool for use with source message catalogs
Syntax
trans [ -c ] [ -o name ] file.msf
Description
The command assists in the translation of source message catalogs. The command reads input from file.msf and writes its output to either a
file named or a file you name on the command line. The command displays file.msf in a multiple window screen that lets you simultaneously
see the original message, the translated text you enter, and any messages from the command. This multiple window screen is easier to use
for translating messages than a single window screen.
The top window in the multiple window screen displays the text in the message source file file.msf. The editor displays the current mes-
sage in reverse video.
In the center window, displays a prompt that asks you to enter a translated message. You use a control key editor to move the cursor and
delete text in the center window. The control key sequences are defined as follows:
------------------------------------------
Key Sequence Meaning
------------------------------------------
CTRL/k Display control key help
CTRL/h Back space
CTRL/l Forward space
CTRL/w Back word
CTRL/f Forward word
CTRL/e Move to end of input
CTRL/b Move to beginning of input
CTRL/n Next line
CTRL/p Previous line
CTRL/u Delete input
CTRL/i Insert mode (default)
CTRL/r Replace mode
DEL Delete previous character
------------------------------------------
If you need to span more than one line with the translated text, type a backslash () and press the RETURN key to enable line continuation.
After you finish entering the translated text, press the RETURN key to signal that you have finished translating that message.
The bottom window displays any messages generated by If an error occurs, prompts you to re-enter the entire line, including the message
label or number.
Options
-c Display comment lines beginning with a dollar sign ($) for translation, in addition to messages.
-o Call the output file name. The default is output file name is
Restrictions
Your terminal must be 80 columns by 24 lines for to display its three-window screen.
You cannot interrupt a session and restart it at the point you stopped. You must complete the all the changes to a file before exiting a
file.
See Also
intro(3int), extract(1int), gencat(1int), strextract(1int), strmerge(1int)
Guide to Developing International Software
trans(1int)