9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to use awk command withing ksh.
ksh "echo \"my name\" | awk '{print $2}'"
I am getting out as :
my name
Expected output:
name
When I use
echo "my name" | awk '{print $2}'
I am getting the correct output:
name
I am not sure what mistake I am doing when using awk... (1 Reply)
Discussion started by: Bala_db2
1 Replies
2. Shell Programming and Scripting
I probably read all the threads in almost all the forums for a solution to my need. I am a beginner in shell scripting and I dont have a perfect solution yet. Below is my code snippet.
idql -n $REPOSITORY_NAME.$cs -Udmadmin -P"" -R$DM_SCRIPTS/test.api > /dev/null 2>&1
if ; then
echo... (7 Replies)
Discussion started by: vishnudev1
7 Replies
3. Shell Programming and Scripting
I want to do the Auto command completion in ksh for my product's CLI. For that I am using the key binding mechanism. But am stuck at following points.
1. I am not able to use .sh.edtext variable while KEYBD trap. As I know this variable contains Characters in the input buffer during... (1 Reply)
Discussion started by: Surendra_Singh
1 Replies
4. Shell Programming and Scripting
Hello,
I am trying to run a remote file (y.ksh) using rsh.
In this action i want to use an environment variable TOOL=/home/macc1
i am running the rsh from profile macc on server1.
rsh server2 -l macc1 "$TOOL/y.ksh"
but i can see that the executable command = /home/macc/y.ksh and not... (1 Reply)
Discussion started by: LiorAmitai
1 Replies
5. Shell Programming and Scripting
$var=`command <arg> <arg>`
I thought there was another method
$var=$(command <arg> <arg>)
I thought I read saw the second example. It doesnt work (2 Replies)
Discussion started by: popeye
2 Replies
6. Shell Programming and Scripting
Sorry for the duplicate thread this one is similar to the one in
https://www.unix.com/shell-programming-scripting/88132-awk-sed-script-read-values-parameter-files.html#post302255121
Since there were no responses on the parent thread since it got resolved partially i thought to open the new... (4 Replies)
Discussion started by: rajan_san
4 Replies
7. Shell Programming and Scripting
Hi,
i am facing an error in the korn shell by executing the following script, can anyone help me out in solving the error..
Note: /root/kamal is a directory
size_dir=$(du -s /root/kamal | cut -f1)
echo $size_dir
error: invalid $ at ( in size_dir
Thanks &... (2 Replies)
Discussion started by: G.K.K
2 Replies
8. Shell Programming and Scripting
Hi,
Any help or suggestions would be most appreciated. I am having problems in the latter end of this ksh script where I will be checking two files. If they exist do nothing otherwise I need to reinitialize the database which resides on o/s Aix 5.3. The problem I am facing is when the reinit... (2 Replies)
Discussion started by: hgjdv
2 Replies
9. Shell Programming and Scripting
Hi,
I am very confused with my printf command.
Somehow one variable can't line up with others...
newstart2 ="Mon Nov 11 01 00:00:00 2002"
printf "%-20s" $newstart2
Here is the output:
Mon Nov 11
01 00:00:00 2002
It spread out to two lines..
Why? (1 Reply)
Discussion started by: cin2000
1 Replies