Search Results

Search: Posts Made By: squrcles
2,567
Posted By squrcles
Thanks for all you suggestions, i'm my haste I...
Thanks for all you suggestions,
i'm my haste I did not make it clear what my end required result was.

whilst reading through the list I need to capture the text between each individual ##START##...
2,567
Posted By squrcles
Extract lines between patterns
I have a list in the format below, how do I read through the list and extract the lines between the ##START## and ##END##, so i can check for specific values between each ##START## & ##END##...
4,665
Posted By squrcles
sed - replacing a substring containing a hyphen
I'm attempting to replace a substring that contains a hyphen and not having much success, can anyone point out where i'm going wrong or suggest an alternative.


[root@localhost kvm]# echo...
1,122
Posted By squrcles
Port listing Solaris and Linux
I'd like to list all ports and the services allocated to them:
1) What commands will do this on Solaris 10 and Linux?
2) Is there a file containing the port/service mapping?
1,351
Posted By squrcles
Set variable to path that does not exist on local host
Can anyone suggest a workaround


zone_5.org='/qaz/qwe/path/tns.osn'


output
/home/bingo/XXX_script.sh: line 180: zone_5.org=/qaz/qwe/path/tns.osn: no parent

The path does not exist on the...
1,283
Posted By squrcles
Nested variable allocation
I've made a number of errors with this and am trying to work a solution within the same framework.

/bin/ksh
for host_name in ahost1 ahost2 bhost1 bhost2
do
for host_prefix in a b
do
...
1,720
Posted By squrcles
nawk gives the same response as awk $ df -h...
nawk gives the same response as awk

$ df -h | awk '$5 > 75 {print}'
Filesystem size used avail capacity Mounted on
a/b/c/ 20G 1.4G 18G 8% /blah/blah
w/x/y ...
1,720
Posted By squrcles
Df -h | awk - output incorrect matching
Running solaris 9, on issuing the follwing command
df -h | awk '$5 > 45 {print}'
Filesystems with utilisation > 45% are being displayed as well as those between
5 and-9%!!!
1,586
Posted By squrcles
I still get the password prompt,
I still get the password prompt,
1,586
Posted By squrcles
Ssh & sudo
when the following command is issued the command prompt is received, how do I get past this?

ssh -t usera@hosta sudo su - userb -c id
1,417
Posted By squrcles
Thanks, I have a few more directories to search...
Thanks,
I have a few more directories to search on the host, that's why I attempted to do it via a here doc
1,417
Posted By squrcles
SSH - remote output locally
The code below works ok, however; I need to output the results to a local variable



the_path="/mnt/back/hang"
ssh -T -i /home/buddy/.ssh/id_rsa buddy@ginger << EOF
find ${the_path} -name...
3,350
Posted By squrcles
Echo backspace in spinner script
Trying to insert a backspace for echo.


while true ; do
i='-\|/'
for j in 1 2 3 4
do
echo -ne "$(echo ${i} | cut -c${j})"
sleep 1
done
done

this currently outputs:
-\|/-\|/-\|/-\|...
3,245
Posted By squrcles
I've tested both variants successfully using the...
I've tested both variants successfully using the korn shell.
3,245
Posted By squrcles
coding question
what is the difference between using

$(cat <<MENU...

&

$(<<MENU...
3,745
Posted By squrcles
dumb question, but what's the difference between...
dumb question, but what's the difference between the back quotes and parentheses?
3,745
Posted By squrcles
Unknown test operator
O/S solaris 9
shell ksh


if [ ! `uptime | grep day` ]
then
chk_op[0]="WARNING...reboot within the last 24hrs, restarted at `who -r | awk '{print $4$5"@"$6}'`" ;
else
if [ `uptime |...
6,241
Posted By squrcles
sorry i've framed my question incorrectly. I...
sorry i've framed my question incorrectly.

I need to grep a file for a pattern and output the non matching part of the line
6,241
Posted By squrcles
a file containing https://www.amazon.com ...
a file containing
https://www.amazon.com
Help.com (http://www.help.com)
https://www.google.com
http///www.bbc.com
grep -o 'https://' filename....... print non matching part of output
6,241
Posted By squrcles
Grep negative matching
is it possible to reverse the output of grep -o
17,789
Posted By squrcles
Thanks, that exactly what I was after. ...
Thanks, that exactly what I was after.

---------- Post updated at 12:57 PM ---------- Previous update was at 12:45 PM ----------

if an arrays contents where

array[0]="the quick"...
17,789
Posted By squrcles
Display array contents on a new line
ksh
eg
arrayname=(1 2 3 4 5)

I'm trying to display the individual contents of an array on a new line without using a loop, using one line of code.

output
1
2
3
4
5
2,327
Posted By squrcles
Find string in variable
korn shell,

testing if a pattern exist in a string,
x is constant, y could be none,all or any combination of the elements of x,

x="aa bb cc dd ee ff gg hh ii jj kk ll"
y="ff kk"
for z in...
3,955
Posted By squrcles
Pass values to case statement in a function korn shell
I'm in the process of writng a function that consists of a case statement is there a way of calling the function and passing a value to it?

ie

function1 () {
case
opt1 do .....
opt2 do........
1,710
Posted By squrcles
Using the case statement was my fallback solution.
Using the case statement was my fallback solution.
Showing results 1 to 25 of 38

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