hi ygemici,
thanks ..Sorry i didn't explain clearly.. My batch is calling some java program and its taking 2 parameters.
There are 3 cases. It can be either one of these conditions
1)first parameter and second parameter are null
2)first parameter is not null and second parameter is null
3)first and second parameter are not null
################# Program###################
x can be AA;BB;CC or AA ...
##################################
while calling shell script manually i need to use prefix.
1)myscript.sh 2) myscript.sh -parameter1 value or 3) myscript.sh -paramerer1 value -paramter2 value
Last edited by Scott; 09-17-2010 at 12:44 PM..
Reason: Please use code tags
Hi,
I want to add prefix and suffix on line# 205 using SED or AWK and want to change on the same file without creating new file.
This command will be used in the bash script
Am using Bash shell
Regards
Nayaj (3 Replies)
i would like to format the 9 character with suffix as "0".
i tried below it doesn't work.
>a=12345
> echo $a | awk '{printf "%-09s\n",$1}'
>12345
required output is 123450000
can you guys help me out ? (7 Replies)
Hi, I'm new about shell scripting, and I need to do something like
abcd **1234** efgh
by
abcd '''1234''' efgh
I know that command sed helps about change one string by another, but I dont know how to keep whatever is inside **_** and replace * with '.
Thanks! (5 Replies)
hi
I have a string pattern like
...
...
000446448742 00432265 040520100408 21974435 DEWSWATER GARRIER AAG IK4000 N 017500180000000000000000077000000000100
000446448742 00580937 040520100408 32083576 PEWSWATER BARRIER DAG GK4000 ... (6 Replies)
if I want to search those files which were suffix with .c,
I can use find ./ -name *.c
but how to find out those files which were not suffix with .c ??
Thanks a lot! (2 Replies)
Hi all,
Im trying to make a proper hosts.allow with the lists of sshbl.org to block the ssh brute force attackers.
The list is a text file with an IP on every line.
What I've gotten up sofar is to prefix "sshd : " on every line, but I need a " : deny" suffix behind every line as well. ... (9 Replies)
Hi all,
i have a shell script invoking a pl/sql proc which then, generates a file in a format
DATA-26-12-2009.txt. The shell script is configured as a cron job to run once a day.
If i need to run the script more than once, i need to suffix the generated file with a two digit running... (4 Replies)
I am using GNU csplit to extract chapters from a big file into smaller files.
I want to use the -b option
-b, --suffix-format=FORMAT use sprintf FORMAT instead of %d
but I have failed so far.
1) All the generated files need to have a suffix .txt at the end
2) They have to look like... (1 Reply)
Hi,
I have a variable, which contains comma separated values. Something like.
StringA="abc,def,ghi,jkl"
I want to apply prefix and suffix to each value in the string without using any loops.
Say if Prefix is Pre_ and Suffix is _Suf then I need to get
... (1 Reply)