10 More Discussions You Might Find Interesting
1. 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
2. Shell Programming and Scripting
Hi,
Wish to remove "DR-" from the string variable (var).
var="DR-SERVER1"
var=`echo $var | sed -e 's/DR-//g'`
echo "$var"
Expected Output:
However, I get the below error:
Can you please suggest. (4 Replies)
Discussion started by: mohtashims
4 Replies
3. Shell Programming and Scripting
Hi All,
I'm facing issue wherein I have 2 character string like 'CR' and 'DR' and I want to extract just 1st character but am unable to do it. I tried below options but they are returning me 2nd character only,
var="CR"
echo ${var:1}
returns just "R"
echo ${var:0}
returns "CR"
... (5 Replies)
Discussion started by: arvindshukla81
5 Replies
4. 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
5. 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
6. UNIX for Dummies Questions & Answers
I am trying something like below. But unfortunately i am missing sthg here.
$ HOSTEXT=hostname | awk '{print substr ($0,7)}'
$ echo $HOSTEXT
$
Suggestioins/Solutions will very much be appreciated.
Thanks in advance,
best-dyno. (2 Replies)
Discussion started by: best-dyno
2 Replies
7. 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
8. 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
9. Shell Programming and Scripting
I'm working in:
#!/bin/ksh
My question:
I have a variable latest_bus_date, which in in the format YYYYMMDD. I would like to create a new variable that is in the format of MMDDYY using the data stored in latest_bus_date.
$latest_bus_date='20020304'
The new variable should have: 030402... (2 Replies)
Discussion started by: blt123
2 Replies
10. 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