10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi I have to extract the destination path information from each record the file is of variable length so I will not be able to use the print command.The search should start on variable "destinationPath" and it should end at immediate "," also the first field has to be printed
Input File:... (7 Replies)
Discussion started by: rkakitapalli
2. Shell Programming and Scripting
I want to extract the filename from a string.
This is how I have the rawdata ina file
i want a script which would provide me an output like this
Directory ... (10 Replies)
Discussion started by: sidnow
3. Shell Programming and Scripting
I would like to extract the first portion of filename from a list of files.
The filename pattern is of the form 123456789_TEXT_TEXT_TEXT_.csv. I want to extract just the numerical portion of this filename from the list of files and then output this into another text file.
K (6 Replies)
Discussion started by: kamal_p_99
4. Shell Programming and Scripting
I need to extract the string from file name
I want 01032013 from the above file name. number of characters may differ before the required string but underscores(-) are same number i.e. after second underscore.
Please advise on this.
... (2 Replies)
Discussion started by: cnrj
5. Shell Programming and Scripting
Here is my question: suppose I have files like
1992_month_atmos.nc... (1 Reply)
Discussion started by: 1988PF
6. Shell Programming and Scripting
Would like to seek some help on how to extract a portion of string from log's output as shown below.
Sample of raw data:
piece handle=/test123/disk_dump/test123/df0_cntrl_PCPFCI20120404_68498 tag=TAG20120404T180035 comment=NONE
piece... (13 Replies)
Discussion started by: superHonda123
7. Shell Programming and Scripting
I have 3 files as listed below and highlighted in bold the portions of the filenames I need to extract:
source_tabin_name=`echo $fname | sed 's/_.*//'`
but I... (6 Replies)
Discussion started by: santam
8. Shell Programming and Scripting
I have a script which accept filename and process them, however, one of the file needs 'special' handling so I need to identify it, say the filename contains the word "STOCK" (i.e. NEWYORKSTOCKLIST20060627.txt), I want to check if the filename contains the word "STOCK", how can I do that?... (1 Reply)
Discussion started by: mpang_
9. Shell Programming and Scripting
I have awhole bunch of files and I want to edit stringA with stringB without changing the filename.
I have tried the following sed commands:
sed "s/stringA/stringB/g" *
This will print the correct results but does not actually save it with the new content of the file. when I do a cat on... (5 Replies)
Discussion started by: jjoves
10. UNIX for Dummies Questions & Answers
How to extract a portion of a string from a full string using unix.
Say source string is = "req92374923.log"
I want only the numeric portion of the string say "92374923" how to do that in Unix. (2 Replies)
Discussion started by: ds_sastry