Sponsored Content
Top Forums Shell Programming and Scripting Cutting string values from a file Post 302910512 by clx on Friday 25th of July 2014 02:10:12 AM
Old 07-25-2014
Please use code-tags. Select the code and hit this icon.

You can try with

Code:
awk -F: '{print $(NF-1) FS $NF}' file

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Cutting Up a String

I have a file name coming in as such <string>_YYYYMMDD.DAT The string could be anything. I want to cut out the date and put it in a variable. Can someone help me with this? (4 Replies)
Discussion started by: lesstjm
4 Replies

2. Shell Programming and Scripting

cutting part of string

Hi, I wanted to cut a specific portion from given string. How would I do that? Example: /u09/core/inbound/abc.txt is my string. I want abc.txt in a variable. Please help me. Regards, Dhaval (3 Replies)
Discussion started by: dhaval_khamar
3 Replies

3. Shell Programming and Scripting

Problem cutting & comparing values

Hi guys I am having some problem cutting and comparing values.I got an INI file which is has some values and ranges mapping to error and warning codes eg criticalerror:69,20,1to9 warningmsg:101,10to19 So taking the scenrio where i have a control script that execute a.ksh, when a.ksh... (6 Replies)
Discussion started by: wilsontan
6 Replies

4. Shell Programming and Scripting

Cutting segment of a string

Hi, I am using bash. My question concerns cutting out segments of a string. Given the following filename: S2002254132542.L1A_MLAC.x.hdf I have been able to successfully separate the string at the periods (.): $ L1A_FILE=S2002254132542.L1A_MLAC.x.hdf $ BASE=$(echo $L1A_FILE | awk -F.... (5 Replies)
Discussion started by: msb65
5 Replies

5. Shell Programming and Scripting

Trouble cutting characters into a string.

I just have a couple of quick questions. I am having trouble with this cut. I am basically trying to cut the string so that i can insert the users guess at the appropriate point in the string. $letters is the character count of the $word. What it seems to do is cut the character into the... (0 Replies)
Discussion started by: Makaer
0 Replies

6. Shell Programming and Scripting

Cutting the value from a string

Hi all I have a string variable ${WHERE_SQL1} where i want to cut the first value of a variable. Eg ${WHERE_SQL1} = 'Where a.id =.................' I the string to be 'a.id =.......' Thanks in advance (2 Replies)
Discussion started by: theeights
2 Replies

7. UNIX for Dummies Questions & Answers

Help with cutting a string

Hi All, I have a string in the following format "abcd | fghfh | qwer | ertete" I need to cut the values in the following format line1 = abcd | fghfh | qwer line2 = ertete Simply speaking a want to cut all the values before the last delimiter from the line and print it on one line and... (11 Replies)
Discussion started by: amit_kv1983
11 Replies

8. Shell Programming and Scripting

Cutting string inside if

I was trying the below statement if It is working fine if I run it in a test file. but not working, when I am trying in my actual script. Error: : "${FXML_line:1129:1}": bad substitution Thanks in advance :) PS: Above if block I have a while loop which is reading a... (4 Replies)
Discussion started by: ezee
4 Replies

9. Shell Programming and Scripting

Cutting a string using more than one character as delimiter

Hi , I have a set of files in a folder which i need to cut in to two parts.... Sample files touch AE_JUNFOR_2014_MTD_2013-05-30-03-30-02.TXT touch AE_JUNFOR_2014_YTD_2013-05-30-03-30-02.TXT touch temp_AE_JUNFOR_2014_MTD_2013-05-30-03-30-02.TXT touch... (4 Replies)
Discussion started by: chillblue
4 Replies

10. Shell Programming and Scripting

Cutting values with delimiter

Hi All, I have a string with , delimiter america,finland,netherlands Now i want these values to be stored in file as below with newline character at end of each value america finland netherlands Regards Prasad (3 Replies)
Discussion started by: krishna_gnv
3 Replies
SWISS::DTs(3pm) 					User Contributed Perl Documentation					   SWISS::DTs(3pm)

Name
       SWISS::DTs

Description
       SWISS::DTs represents the DT lines within an Swiss-Prot + TrEMBL entry as specified in the user manual
       http://www.expasy.org/sprot/userman.html .

Inherits from
       SWISS::BaseClass.pm

Attributes
       "CREATED_date"
	   Creation date

       "ANN_date"
	   Last annotation update

       "SQ_date"
	   Last Sequence update

       "CREATED_rel"
	   Created for release

       "ANN_rel"
	   Last annotation for release

       "SQ_rel"
	   Last sequence update for release

       "ANN_version"
	   Version number for entry annotation

       "SQ_version"
	   Version number for sequence

Methods
   Standard methods
       new
       fromText
       toText
       sort

   Writing methods
       set_Created ($date, $release)
       set_AnnotationUpdate ($date, $release[, $version])
       set_SequenceUpdate ($date, $release[, $version])

TRANSITION
The format of the DT line will change in early 2004 from: DT 01-JUL-1993 (Rel. 26, Created) DT 01-JUL-1993 (Rel. 26, Last sequence update) DT 28-FEB-2003 (Rel. 41, Last annotation update) to: DT 01-JUL-1993, integrated into UniProtKB/Swiss-Prot. DT 01-JUL-1993, sequence version 36. DT 28-FEB-2003, entry version 54. This module supports both formats. To convert an entry from the old to the new format, do: $entry->DTs->CREATED_rel("UniProtKB/Swiss-Prot"); $entry->DTs->ANN_version(54); $entry->DTs->SQ_version(36); perl v5.10.1 2008-07-11 SWISS::DTs(3pm)
All times are GMT -4. The time now is 03:15 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy