Sponsored Content
Full Discussion: Stripping date fields
Top Forums Shell Programming and Scripting Stripping date fields Post 42667 by Simerian on Saturday 1st of November 2003 12:05:39 PM
Old 11-01-2003
google is correct in that cut is very slow and should be used sparingly in circumstances where extracts need to occur many times. Much better to use a data processing tool such as awk for mass data extraction and manipulation.

However, I would suggest that you need to get to grips with the fundamentals of UNIX (i.e. commands such as cut) before you try to experiment with more advanced features.

To get the most out of parameter substitution as suggested by google, it is necessary to understand the principles of regular expressions (often called regexp) which underpin many of the best attributes of UNIX commands (e.g. egrep and awk)
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

getting the date fields in Perl

I get the perl date in the following format: Mon Jan 31 06:01:37 2005 How can I extract each field in a single line using a regular expression?? I dont want to use "split". Any other way out?? JP :) (2 Replies)
Discussion started by: jyotipg
2 Replies

2. Shell Programming and Scripting

stripping out certain charecters

we are ftping zipped up files from the development server to the production server daily.The files are in this format filename.dat.20061231.12131.gz I have to unzip the file (i can do that with gunzip) and then strip out the timestamp after the .dat extension. I can do something like this ... (4 Replies)
Discussion started by: mervin2006
4 Replies

3. Shell Programming and Scripting

stripping a variable down

I have a variable that has an absolute path for a file on my computer. This dynamically changes. Is there a way I can assign two new variables from that one? variable: /Users/keith/Desktop/test/file.mov 1) filename - no path or extention ....so just....file 2) path no filename or... (3 Replies)
Discussion started by: mainegate
3 Replies

4. UNIX for Dummies Questions & Answers

Stripping down binaries

Hello, I am the CEO of Grand Tech Corporation. We are launching Linux NT and forgive me, but I do not know how to strip binaries down in Mandriva Linux. Can someone tell me a way to?:b: (2 Replies)
Discussion started by: Linux NT
2 Replies

5. Shell Programming and Scripting

How to remove '-' for date fields alone in a file

Hi, I have a scenario like, I need to replace a hyphens(-) for date field alone in the file. I have minus(-) sign for other fields it should remain as such, only for date fields hyphens must be removed. Please find the content for the file below: sample.txt: -----------... (4 Replies)
Discussion started by: G.K.K
4 Replies

6. Shell Programming and Scripting

Date conversion in row while preserving rest of fields

Hi Forum. I searched the forum for a solution but could not find an exact one to my problem. I have some records in the file where I would like to convert the last date field to another format while preserving the rest of the other fields. For example: Found:... (6 Replies)
Discussion started by: pchang
6 Replies

7. UNIX for Advanced & Expert Users

Sort in fields date and columns.

Hi colleagues, I have this output, i need sort for 7th and 8th columns, the column 7th is date mm/dd/yyyy format and column 8th is time hh:mm:ss.number PRUEBA 1263 0007 1 0 7131292 03/25/2013 16:43:04.159976 PROCESS PRUEBA1 666 0146 1 0 11600064 ... (1 Reply)
Discussion started by: systemoper
1 Replies

8. UNIX for Dummies Questions & Answers

Sorting on fields for last date

Hi all, I have a file with a list of rpm's that have different dates. I am trying to just grab the latest rpm and install date, and discard the rest. The file has 1000's of entries all with different names and dates. I have tried sort -k on the file and I am not grabbing the info, ... (4 Replies)
Discussion started by: gartie
4 Replies

9. Shell Programming and Scripting

Find fields based on date criterion

Hi All , I am trying to find some non empty files from a directory based on below conditions : Files:: SIZE DATE FILE 3679 Jan 25 23:59 belk_rpo_error_po9324892_01252014.log 0 Jul 01 06:30 belk_rpo_error_po9324267_07012014.log 0 Jul 20 05:50... (7 Replies)
Discussion started by: LoneRanger
7 Replies

10. UNIX for Dummies Questions & Answers

Using awk to get folder name and date fields with heading

It is on the HP-Unix Output desired: Folder Name Date Folder1 Mar 18 10:00 Folder2 Mar 17 12:23 Tried with ls -ldt wp411* | awk '{print $9,"\t",$6," ",$7," "$8}' Please help me with the headings (3 Replies)
Discussion started by: Siva SQL
3 Replies
strip(1)						      General Commands Manual							  strip(1)

NAME
strip - Removes symbols and relocation bits SYNOPSIS
strip [-V] file... STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: strip: XCU5.0 Refer to the standards(5) reference page for more information about industry standards and associated tags. OPTIONS
[SVID 3] Displays the version number of the strip command. DESCRIPTION
The strip command removes the symbol table and any strippable subsections of the section, including compact relocation information ordinar- ily present in executable files. This is useful to save space after a program has been debugged. The effect of strip is the same as use of the -s option to cc, c89, or ld. Note that the strip command will not strip executables with unresolved relocation entries. It also does not handle archive files. EXIT STATUS
Success. An error occurred. ENVIRONMENT VARIABLES
The following environment variables affect the behavior of strip: Provides a default value for the locale category variables that are not set or null. If set, overrides the values of all other locale variables. Determines the locale for the interpretation of byte sequences as characters (single-byte or multibyte) in input parameters and files. Determines the locale used to affect the format and contents of diagnostic messages displayed by the command. Determines the location of message catalogs for processing of LC_MESSAGES. Determines the directory where a temporary file will be created (if needed). If not set, the current working directory is used. SEE ALSO
Commands: ar(1), cc(1), c89(1), ld(1), mcs(1) Standards: standards(5) strip(1)
All times are GMT -4. The time now is 08:07 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy