10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I've got this output:
# cat test2.txt
TM1ITP1-TMNLSTP1 SLC00=0,SLC01=0,SLC02=0,SLC03=0
if I just use cat test2.txt | tr "," "\n" I'll end up very near to what I'm trying to achieve:
TM1ITP1-TMNLSTP1 SLC00=0
SLC01=0
SLC02=0
SLC03=0
But how can i eventually add the term... (1 Reply)
Discussion started by: nms
1 Replies
2. Shell Programming and Scripting
Hi,
i have a file with multiple entries. After some tests with sed i managed to get the file output as follows:
lsn=X-LINK-IN0,apc=661:0,state=avail,avail/links=1/1,
00,2110597,2094790,0,81,529,75649011,56435363,
lsn=TM1ITP1-AM1ITP1-LS,apc=500:0,state=avail,avail/links=1/1,... (5 Replies)
Discussion started by: nms
5 Replies
3. Shell Programming and Scripting
Hello,
I have below format log file,
Comparing csv_converted_files/2201/9747.1012H67126.5077292103609547345.csv and csv_converted_files/22019/97447.1012H67126.5077292103609547345.csv
Comparing csv_converted_files/2559/9447.1012H67126.5077292103609547345.csv and... (6 Replies)
Discussion started by: arvindshukla81
6 Replies
4. Shell Programming and Scripting
Hi,
I am trying to compare 2 lists. However, one of these lists has to be taken from a.pdf file. When I copy the test into a .txt document there are formatting errors which I need to correct. The document is long (~10,000 lines) so I need to script the re-formatting.
Currently my file looks... (9 Replies)
Discussion started by: carlr
9 Replies
5. UNIX for Dummies Questions & Answers
Hi,
Is there a one-liner that I can use to change a line of text into a comma delimited string?
For example, convert
user1
user2
user3
user4to
user1,user2,user3,user4Currently using while read x, although got the extra comma at the end that I have to remove manually.
Please... (5 Replies)
Discussion started by: newbie_01
5 Replies
6. UNIX for Advanced & Expert Users
Hi ,
i have a file with data as below.This is same file. But actual file contains to many rows.
i want to search for a string "Field 039 00" and delete that line and previous 3 lines in that file.. Can some body suggested me how can i do using either sed or awk command ?
Field 004... (7 Replies)
Discussion started by: vadlamudy
7 Replies
7. UNIX for Dummies Questions & Answers
awk 'BEGIN{FS = "Ç"}
NR == 1 {p = $0; next}
NF > 1 {print p; p = $0}
NF <= 1 {p = (p " " $0)}
END {print p}' input.txt > output.txt
This is what the input data file looks like with broken lines
Code:
29863 Ç890000000 Ç543209911 ÇCHNGOHG
Ç000000001 Ç055 ... (4 Replies)
Discussion started by: cumeh1624
4 Replies
8. Shell Programming and Scripting
I am trying to delete lines in archived Apache httpd logs
Each line has the pattern:
<ip-address> - - <date-time> <document-request-URL> <http-response> <size-of-req'd-doc> <referring-document-URL>
This pattern is shown in the example of 6 lines from the log in the code box below. These 6... (1 Reply)
Discussion started by: Proteomist
1 Replies
9. Shell Programming and Scripting
Hi folks,
I've list of LDAP records in this format:
cat cmmac.export.tmp2
dn: deviceId=0a92746a54tbmd34b05758900131136a506,ou=devices,ou=customer,ou=nl,o=upc
cmmac: 00:13:11:36:a5:06
dn: deviceId=0a92746a62pbms4662299650015961cfa23,ou=devices,ou=customer,ou=nl,o=upc
cmmac:... (4 Replies)
Discussion started by: tomas.polak
4 Replies
10. Shell Programming and Scripting
Hi,
Please let me know how to find text and print text and its previous line. Please don't get irritated few days back I asked text and next line. I am using HP-UX 11.11
Thanks for your help. (6 Replies)
Discussion started by: kamranjalal
6 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)