Sos


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Sos
# 1  
Old 08-04-2006
Sos

Dear "expert",

I need to know the command syntax to get the last field of the line below using shell or awk.

MD5 ("P~04-05-2006~PROPAY_IFT~0662012000750~~PAY2~IFTTEST123~1000.23~~~~AMBB~0012010003406~~~~~~~~~~~~~~~~~~~~~~~A 1234567890B1234567890C1234567890~D1234567890E1234567890F1234567890~G1234567890H1234567890~~") = 0616f08fec37ebf30c1e87cb26e6b200

I expect to have the answer as below
0616f08fec37ebf30c1e87cb26e6b200

Many thanks.
# 2  
Old 08-04-2006
This should work


awk -F"= " '{print $2}' filename
# 3  
Old 08-06-2006
I have tried the AWK script and managed to receive the answer. Thanks.


I would like to find out how to eliminate the left most column which have a space there.
# 4  
Old 08-06-2006
Use the 'tr' command.
Code:
awk -F"= " '{print $2}' filename | tr -d '[:space:]'

The [:space:] will remove any whitespace characters from the line. If you just want to remove ' ' (space) chars, run "tr -d ' '"
# 5  
Old 08-06-2006
Thank you!!

Many thanks to you all!!

THANK YOU...THANK YOU...THANK YOU...THANK YOU...THANK YOU...
THANK YOU...THANK YOU...THANK YOU...THANK YOU...THANK YOU...
THANK YOU...THANK YOU...THANK YOU...THANK YOU...THANK YOU...
THANK YOU...THANK YOU...THANK YOU...THANK YOU...THANK YOU...
THANK YOU...THANK YOU...THANK YOU...THANK YOU...THANK YOU...
THANK YOU...THANK YOU...THANK YOU...THANK YOU...THANK YOU...
THANK YOU...THANK YOU...THANK YOU...THANK YOU...THANK YOU...
THANK YOU...THANK YOU...THANK YOU...THANK YOU...THANK YOU...
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. HP-UX

sos about swpackage AND swinstall

hi all, I just want to make a depot package.All steps: 1. make a psf file # PSF which define the myutil product depot layout_version 1.0 tag ddmi_linux_installer title ddmi_linux_installer # Product definition vendor tag HP title Hewlett-Packard Company product tag... (0 Replies)
Discussion started by: lb1111830
0 Replies

2. Solaris

file not found (SOS)

Hi, friends, I am new here and also new in Unix. I want your kindly help for now! I cannot run the program vmed on my computer ,that reply the error $ vmed bash: vmed: command not found $ ./vmed ld.so.1: vmed: fatal: libpgplot.so: open failed: No such file or directory Killed as I... (12 Replies)
Discussion started by: wholesome80
12 Replies

3. Shell Programming and Scripting

SOS whit SED

Hello, I know how to get a solution of a filtering problem with AWK, but i need change default field separator by a regular expression. awk -F "xxx" What i want to do is take a stranza as a field, so the field separator must be a EMPTY line. Does anybody how to do that?? a example: ... (1 Reply)
Discussion started by: antuan
1 Replies

4. Solaris

sun connect :SOS

hi all, does someone have any information about "sun connect" (like documentation , web site , forums , explanations .....) ? because i will need this software in my job & i don't know how to use it :o (4 Replies)
Discussion started by: lid-j-one
4 Replies

5. Shell Programming and Scripting

Sos Sos

INPUT---> USER | User1 | DisplayName1 | HomeTown1 | 987654321 | 27-07-1991 | M i want to separate out all the fields of the file which has the format specified above , with the use of awk. I was writing that to the mysql by batch-file. But now there is problem , in databse i have defined the... (2 Replies)
Discussion started by: yogesh_powar
2 Replies

6. UNIX for Dummies Questions & Answers

[sos]How to resure my system.

Yesterday,I have a unnormal shutdown of my SCO Unix system,when I boot again,There are lots of Errors (e.g policy manager error, ifor_pmd error etc.),Most seriously,I can use my "CC" compiler: when I compile my *.c files. Who Can Help Me ! Please Don't spare your instructions! Thanks a... (5 Replies)
Discussion started by: dingxf
5 Replies

7. UNIX for Dummies Questions & Answers

(SOS) Please help !

Does anybody can help me with the definition of "terminal" DTE and DCE in context to Unix ?. This has something to do with devices in Unix. I need it asap. Thank you very much !:confused: (1 Reply)
Discussion started by: aqua_jan
1 Replies
Login or Register to Ask a Question