10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I am using the below script which has awk command, but it is not returing the expected result. can some pls help me to correct the command.
The below script sample.ksh should give the result if the value of last 4 digits in the variable NM matches with the variable value DAT. The... (7 Replies)
Discussion started by: G.K.K
7 Replies
2. Shell Programming and Scripting
Hi All,
I am trying to use a variable within the sed command but I am not able to get the output.
When I am using the following command (without variable) its working fine:
sed -n '/2011\/12\/10 18:11:11./,$p' < Log.txt > Delta_Log.txt
But when I am putting the value 2011\/12\/10... (4 Replies)
Discussion started by: acoomer
4 Replies
3. Red Hat
Hi all,
Hereby wish to have your advise for below:
Main concept is
I intend to get current directory of my script file.
This script file will be copied to /etc/init.d.
A string in this copy will be replaced with current directory value.
Below is original script file:
... (6 Replies)
Discussion started by: cielle
6 Replies
4. Shell Programming and Scripting
Hi,
I'm sure that it's a very simple issue.
this is a part of my code :
while read ligne
do
result=`ls -R ../FILES/|grep "."$ligne"$"`
echo $result
done<TYPE_EXT_FILES.txt
the echo return nothing (as my variable is empty).
I'm sure that the problem... (10 Replies)
Discussion started by: skubann
10 Replies
5. Shell Programming and Scripting
I'm trying to make a sed substitution where the substitution pattern is an environment variable to be expanded, but the variable contains a "slash".
sed -e 's/<HOME_DIRECTORY>/'$HOME'/'This gives me the following error:
sed: -e expression #1, char 21: unknown option to `s'Obviously this is... (2 Replies)
Discussion started by: Ilja
2 Replies
6. Shell Programming and Scripting
I want to instert Category:XXXXX into the 2. line
something like this should work, but I have somewhere the wrong sytanx. something with the linebreak goes wrong:
sed "2i\\${n}Category:$cat\n"
Sample:
Titel Blahh Blahh abllk sdhsd sjdhf
Blahh Blah Blahh
Blahh
Should look like... (2 Replies)
Discussion started by: lowmaster
2 Replies
7. Shell Programming and Scripting
Execution of the following segment is giving the error -
Script extract:-
OUT=$DATADIR/sol_rsult_orphn.bcp
TMP1=${OUT}_tmp1
TMP=${OUT}_tmp
( isql -w 400 $dbConnect_OPR <<EOF
select convert(char(10), s.lead_id)
+'|'
+ s.pho_loc_type,
";",
s.sol_rsult_cmnt,
";",
+'|'+ s.del_ind... (3 Replies)
Discussion started by: kzmatam
3 Replies
8. Programming
Hi All,
i am new to unix..
i have an issue with my unix script...let me explain the task that i want to make script....
i prepared script which will connect data base from my linux box using sqlplus cmd...
however in that i want to use the variable like below..
select * from... (0 Replies)
Discussion started by: Shahul
0 Replies
9. Shell Programming and Scripting
Hello,
i have another sed question.. I'm trying to do variable substition with sed and i'm running into a problem.
my var1 is a string constructed like this:
filename1 filerev1 filepath1
my var2 is another string constructed like this:
filename2 filerev2 filepath2
when i do... (2 Replies)
Discussion started by: alrinno
2 Replies
10. Solaris
#!/bin/ksh
VAR_ONE=HELLO
TEMP=ONE
echo $VAR_${TEMP}
## Output is: ONE
Hi, I want the output to echo HELLO and not ONE as the above script does. I know I am missing something with dollar substitution. Can anyone help me out ?
Thanks.
Cal (4 Replies)
Discussion started by: calredd
4 Replies