01-24-2008
Actually my file name is like
JAN_BILS_PRINT_1-01-08.txt
But when i receive the file on later dates (from 10th and later), the file name would be like,
JAN_BILS_PRINT_10-01-08.txt
Therefore I would like to extract the part after the last "_" upto the "." and then change the file format. How can this be done?
Last edited by bhalotias; 01-24-2008 at 12:09 PM..
10 More Discussions You Might Find Interesting
1. Programming
for example, the string a is "abcdefg", can i get a substring "bcd" (from ato a) from string a?
thank you (4 Replies)
Discussion started by: dell9
4 Replies
2. Shell Programming and Scripting
hi all,
I am trying to extract SUBSTRINGS out of a string using ksh.
The string is "SAPR3K.FD0.FA.TJ.B0010.T050302"
I tried using
a= `expr substr $stringZ 1 2`
which is giving me a syntax error, donno why??
any ideas why its not working??
I also tried
echo "welcome" | awk '{... (3 Replies)
Discussion started by: maradona
3 Replies
3. UNIX for Dummies Questions & Answers
Hi All,
Can anybody help me to get the substring from the given string. (3 Replies)
Discussion started by: Anshu
3 Replies
4. Shell Programming and Scripting
Hi All,
Problem Description:
XML_REP_REQUEST=`CONCSUB "$LOGIN" "SQLAP" "$RESP_NAME" "$USRNM" WAIT="Y" "CONCURRENT" "APPLICATION_SHORT_NAME"
"CP_SHORT_NAME"`
echo Report Request: $XML_REP_REQUEST --to print value in log file
While execution the value of 'XML_REP_REQUEST' is 'Prozess... (5 Replies)
Discussion started by: suman.g
5 Replies
5. Shell Programming and Scripting
#!/bin/sh
PRINTF=/usr/bin/printf
PASSWD=/etc/passwd
$PRINTF "Enter a UserID\n"
read USERID
if ; then
$PRINTF "$USERID does not exist, please contact IT service\n"
exit 1
fi
USERHOME=`grep "^$USERID:" $PASSWD | awk -F : '{print $6}'`
USERSHELL=`grep "^$USERID:"... (1 Reply)
Discussion started by: ikeQ
1 Replies
6. Shell Programming and Scripting
hello,
i have this string:
variable="1234 /PARAMETER_1:text /PARAMETER_2:othertext"
i tried to do
expr match $variable '.*\(*\)'
but i keep getting expr error
i need to extract the word text...
thank you (4 Replies)
Discussion started by: Aloush89
4 Replies
7. Shell Programming and Scripting
Hi,
I have the below data
ownername/schemaname/tablename/columnname in a file ( 2nd column)
I want to convert everthing to upper case except the column name like below
OWNERNAME/SCHEMANAME/TABLENAME/columnname
do we have a instring function in awk to handle this.
Thx,shruthi (3 Replies)
Discussion started by: shruthidwh
3 Replies
8. Shell Programming and Scripting
Hi,
I have an input string say for example:
ABC,DEF,IJK,LMN,...,XYZ
The above string is comma delimited. Now I have to extract the last part after the comma i.e. XYZ.
:b: (3 Replies)
Discussion started by: bghosh
3 Replies
9. UNIX for Dummies Questions & Answers
Hi Dears,
How to use variable in string location of expression ${string:index:length} to get substring from string?
I encounter error "bad substitution" when I use expression ${$var:0:5} to get first 5 characters from $var.
Could you please help me out of this? Thanks! (2 Replies)
Discussion started by: crest.boy
2 Replies
10. Shell Programming and Scripting
Hello.
First best wishes for everybody.
here is the input file ("$INPUT1") contents :
BASH_FUNC_message_begin_script%%=() { local -a L_ARRAY;
BASH_FUNC_message_debug%%=() { local -a L_ARRAY;
BASH_FUNC_message_end_script%%=() { local -a L_ARRAY;
BASH_FUNC_message_error%%=() { local... (3 Replies)
Discussion started by: jcdole
3 Replies
LEARN ABOUT DEBIAN
unmass
UNMASS(1) General Commands Manual UNMASS(1)
NAME
unmass - extract game archive files
SYNOPSIS
unmass [options] file
DESCRIPTION
This manual page documents briefly the unmass command.
unmass is a tool to extract game archives. It supports the following archive types: Crismon Land, Baldur's Gate 2, Civilization 4, Doom
(WADs), Dune 2, Etherlords 2, Final Fantasy 7 and 8, Flashpoint, Knights of Xentar, Metal Gear Solid (DARs), Moorhuhn 2 and 3, Megaman Leg-
ends, Oni, Operation Flashpoint, Princess Maker 2, Quake 1, RollCage, Swine, Unreal Tournament umods, Virtua Fighter bitmaps, MEA exe's,
some economy file format.
OPTIONS
-h, --help
Show summary of options.
-e <archive file> <file name> [...<file name>]
Opens the archive and extract files.
--modules
Prints out list of modules for archive loading.
--list <archive file>
Opens the archive and prints list of the files inside.
EXAMPLES
Display list of files contained inside archive 'battle.lgp'
unmass -list battle.lgp
Opens 'battle.lgp' and extracts file 'aabc.txt' and all files ending
with 'dat' into current directory
unmass -e battle.lgp aabc.txt *dat
SEE ALSO
pak(1).
AUTHOR
unmass was written by Miro Janosik.
This manual page was written by Gurkan Sengun <gurkan@phys.ethz.ch>, for the Debian project (but may be used by others).
July 9, 2007 UNMASS(1)