Search Results

Search: Posts Made By: balamv
997
Posted By balamv
Display 2 lines before and after a particular pattern
Hi team,
Is it possible to display 2 lines after a particular pattern in a shell script. For example in a file which has the below contents.

Mummy
Daddy
Son
Daughter
Children
Aunty
Uncle...
Forum: IP Networking 05-06-2011
4,644
Posted By balamv
Open/close of ports
Hi,

I have read some forum theads about the open and close ports. some points are clear and it is not working on my machine or something am i missing?

I have commented out a port...
Forum: Solaris 01-21-2010
6,313
Posted By balamv
Hi, I just tried, file...
Hi,

I just tried,

file /devices/pseudo/tl@0:ticotsord
/devices/pseudo/tl@0:ticotsord: character special (105/1)


But is this really a file?
Forum: Solaris 01-21-2010
6,313
Posted By balamv
How to get the filepath and filenames in pfiles PID command?
Hi,

When I use pfiles PID, it displays the below output and i just see the inode, can i able to get the full path and file name? pl help me on this.

Current rlimit: 8192 file descriptors
0:...
Forum: Solaris 01-11-2010
3,469
Posted By balamv
How to check what are the files used by a particular process in Solaris?
Hi,

How to check what are the files used by a particular process in Solaris?
I checked lsof -p PID - this is not there in my system. Is this comes by default ?

Thanks,
Bala
5,146
Posted By balamv
Thanks. This works..
Thanks. This works..
5,146
Posted By balamv
for example, Enter the names: Test hai hello...
for example,

Enter the names: Test hai hello

I need the last digits of all the inputs..
here " tio " [last digits of Test hai hello]

Hope, you can understand my req. Thanks for your help
5,146
Posted By balamv
i want to get the last digit.. it may contain...
i want to get the last digit.. it may contain letters also instead number..

your command works only to extract the numbers.. but i did not want this.

Pl help
5,146
Posted By balamv
Hi, Thanks for the reply. But am...
Hi,

Thanks for the reply.

But am getting error...

echo "secret1 secret2 serect3" | awk '{gsub(/[a-z]/,""); print $0}'
awk: syntax error near line 1
awk: illegal statement near line 1
5,146
Posted By balamv
Extract the letter from string
Hi,

Pl help me.

User is entering the values for the given input

Enter keys: secret1 secret2 secret3

can i extract the last digit of each values in the keys..
here for ex. 1 2 3

can...
44,484
Posted By balamv
How to unset all variables in shell?
can I use unset to unset all the variables in a shell sciprt?

VAR1=1
VAR2=2
VAR3=3
unset

whether this unset will afftect any system variables?

Thanks,
1,675
Posted By balamv
Thanks, it works as you said.
Thanks, it works as you said.
1,675
Posted By balamv
Finding a letter in a string
How to check whether a particular string contains dot [.] or not?
Here I can not use grep as the string is not in a file. I will get this string from user input

Thanks,
4,710
Posted By balamv
Thank you so much. nameCheck "$names" -...
Thank you so much.

nameCheck "$names" - This works as expected.
4,710
Posted By balamv
Passing space separated value to a function - error
Taking inputs in the script which is space separated and passing this to a function and i have assigned like below
And then when I use for loop for the inputs i got from the user, it is taking only...
2,742
Posted By balamv
Thank you so much
Thank you so much
2,742
Posted By balamv
Issue in Variable in SSH
Friends,
I want to write a script. The logic follows

1. Script starts
2. SSH to Remote Machine and check whether /home/testUser dir is there or not.
3. If it is there, am assigning a value to a...
1,549
Posted By balamv
Thank you so much ---------- Post updated at...
Thank you so much

---------- Post updated at 05:50 PM ---------- Previous update was at 04:34 PM ----------

Hi,

Is this correct? I am getting the below error..


/sbin/sh: yes: not found
1,549
Posted By balamv
ssh doubt..
Hi,

I want to remove some package in a remote server, I am executing as the below script

ssh -q REMOTE_SERVER "pkgrm PKGNAME"

but it is asking can you confirm for the removal of pkg?

so...
1,820
Posted By balamv
Error while running your script -- Balamv
When I run this, I am getting the below error. Why? Pls help me

#!/bin/ksh
echo Hello World
dirs="not_using_0"
for entry in *; do
[ -d "$entry" ] && dirs="$dirs $entry"
done
dirarray=($dirs)...
3,315
Posted By balamv
When I run this, I am getting the below error....
When I run this, I am getting the below error. Why? Pls help me

#!/bin/ksh
echo Hello World
dirs="not_using_0"
for entry in *; do
[ -d "$entry" ] && dirs="$dirs $entry"
done...
1,703
Posted By balamv
No. THIS IS NOT GIVING THE OUTPUT AS EXPECTED. ...
No. THIS IS NOT GIVING THE OUTPUT AS EXPECTED.
hello-ssl
welcome-ssl
hi
bye-ssl
seeyou
1,703
Posted By balamv
grep problem
Example:

bash:pwd
/home/balamv


bash:more test.txt
hello
hello-ssl
welcome
welcome-ssl
hi
bye
bye-ssl
seeyou

I want to get all the lines which contain ssl and also the one does not...
3,315
Posted By balamv
Thank you so much for the clear explanation. You...
Thank you so much for the clear explanation. You are a very nice person to explain the things to others. Once again thank u.
16,967
Posted By balamv
Changing cursor position using shell script
Hi,

Pleae help me on this. Normally, when we say read username, the cursor will come in the first position of next line, but I want the output of the below


Normal usage
-------------
...
Showing results 1 to 25 of 28

 
All times are GMT -4. The time now is 06:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy