10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Dear Experts,
I have some directory structure something like follows. I would like to cut portion of it. Would you please help me? I have to run this on several sql's. The directory path is dynamic. I have cut what comes after first "sql" string.
Input:... (3 Replies)
Discussion started by: srikanth38
3 Replies
2. Shell Programming and Scripting
Hi all,
Can anyone suggest a way to get a portion of string from the end?
So:
$ORACLE_SID=blt10cr1
We can drop the final '1' and end up with:
$ORACLE_SID=blt10cr
So far I have the following:
echo $ORACLE_SID | cut -c1-5
and
echo $ORACLE_SID | cut -c1-6 | rev
any ideas? (4 Replies)
Discussion started by: jonnyd
4 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 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
5. Shell Programming and Scripting
I have a script which currently uses a file containing a list of directories as an argument. The file is read in to an array, and then the array is iterated in a for loop.
What I would like to do is cut off the first few directories of the directory path (they won't exist on the server where the... (5 Replies)
Discussion started by: msarro
5 Replies
6. Shell Programming and Scripting
I have 2 text files say file1.txt and file2.txt . Some of the sample records for file1.txt were shown below:
XXXXX12345XXXXXXX12 3456789YYYYY
XXXXXXXXXX12345XX123457485YYYYY
XX12345XXXXXXXXXX123454658YYYYY
for file2.txt, some of the sample records were shown below:
... (5 Replies)
Discussion started by: bobby1015
5 Replies
7. Shell Programming and Scripting
Hi All
I wanted to know how to effectively delete some columns in a large tab delimited file.
I have a file that contains 5 columns and almost 100,000 rows
3456 f g t t
3456 g h
456 f h
4567 f g h z
345 f g
567 h j k lThis is a very large data file and tab delimited.
I need... (2 Replies)
Discussion started by: Lucky Ali
2 Replies
8. Shell Programming and Scripting
Hi,
I do have a TAB delimted text file with the following format.
1 (- identifier of each group. this text is not present in the file only number)
1 3 4 65 56 WERTF
2 3 4 56 56 GHTYHU
3 3 5 64 23 VMFKLG
2
1 3 4 65 56 DGTEYDH
2 3 4 56 56 FJJJCKC
3 3 5 64 23 FNNNCHD
3
1 3 4 65 56 JDHJDH... (9 Replies)
Discussion started by: Lucky Ali
9 Replies
9. UNIX for Dummies Questions & Answers
Hi,
How to strip a portion of a file name from behind...Say for Eg..i have a file name like aaaaa.bbbbb.Mar-17-2007
i want to remove .Mar-17-2007...is there a one line command which can give this output...
Thanks
Kumar (5 Replies)
Discussion started by: kumarsaravana_s
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