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
7 Replies
2. Shell Programming and Scripting
I want to extract the filename from a string.
This is how I have the rawdata ina file
/home/sid/ftp/testing/abc.txt
/home/sid/ftp/tested/testing/def.txt
/home/sid/sftp/date/misc/hij.txt
i want a script which would provide me an output like this
Directory ... (10 Replies)
Discussion started by: sidnow
10 Replies
3. Shell Programming and Scripting
Hi
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
6 Replies
4. Shell Programming and Scripting
Hi
I need to extract the string from file name
filename: FILENAME_STRUT_01032013_XXXXXXX.TXT
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
2 Replies
5. Shell Programming and Scripting
Hi,
Here is my question: suppose I have files like
1990_8xdaily_atmos.nc
1991_8xdaily_atmos.nc
1992_8xdaily_atmos.nc
1993_8xdaily_atmos.nc
1990_daily_atmos.nc
1991_daily_atmos.nc
1992_daily_atmos.nc
1993_daily_atmos.nc
1990_month_atmos.nc
1991_month_atmos.nc
1992_month_atmos.nc... (1 Reply)
Discussion started by: 1988PF
1 Replies
6. Shell Programming and Scripting
Hi Gurus,
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
13 Replies
7. Shell Programming and Scripting
Hi All
I have 3 files as listed below and highlighted in bold the portions of the filenames I need to extract:
TOS_TABIN218_20090323.200903231830
TOS_TABIN219_1_20090323.200903231830
TOS_TABIN219_2_20090323.200903231830
I tried
source_tabin_name=`echo $fname | sed 's/_.*//'`
but I... (6 Replies)
Discussion started by: santam
6 Replies
8. Shell Programming and Scripting
hi,
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_
1 Replies
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
5 Replies
10. UNIX for Dummies Questions & Answers
How to extract a portion of a string from a full string using unix.
For example:
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
2 Replies