Search Results

Search: Posts Made By: bash_in_my_head
3,894
Posted By bash_in_my_head
Neo I didnt specify a port number during my key...
Neo
I didnt specify a port number during my key creation. I have used this same key pair to successfully log in to 100s of servers.
RudiC
I am using the same user when I attempt to login. I...
3,894
Posted By bash_in_my_head
I stopped sshd and edited sshd_config and moved...
I stopped sshd and edited sshd_config and moved from port 22 to port 2200. Started sshd and I was able to ssh into server F without entering a password. When I moved the port back to 22 I was...
3,894
Posted By bash_in_my_head
Yes correct, I did not want to risk messing with...
Yes correct, I did not want to risk messing with port 22 and the sshd running on that port in case it stopped working I may not be able to log back in. So I set up a sshd on port 2200 for testing...
3,894
Posted By bash_in_my_head
Ssh public/private key user login problem
I have a user account configuration with ssh public/private key that works on multiple servers centos and rhel. One server (Server F) that is not working in centos 6.8. When i ssh into server f I...
1,164
Posted By bash_in_my_head
That works nicely, thanks I need to search for...
That works nicely, thanks
I need to search for a second match in the same section "mysql Ver xx.xx" . I really only need to search for
mysql Ver
1,164
Posted By bash_in_my_head
Search file containing ps results for a match "my.cnf" and then for a second match . "ok:" and
I need to find two matches in the output from ps. I am searching with ps -ef |grep mysql for:

my.cnf

/bin/sh /usr/bin/mysqld_safe --defaults-file=/data/mysql/master/agis_core/etc/my.cnf
...
1,927
Posted By bash_in_my_head
I have been attempting to replace "checkhosts"...
I have been attempting to replace "checkhosts" num=$RANDOM
How can i do this? Currently when i place single quotes, double quotes or no quotes I get an error..
num=$RANDOM
echo $num


{ ...
1,927
Posted By bash_in_my_head
Gnu tool; sed awk echo etc to prepend or append string to a file
Looking to add text to a file, example

File example;

nodegroups:
check-hosts: L@host.domain.com,host2.domain.com,host3.domain.com
I need to take a file with a one line list of hosts...
1,620
Posted By bash_in_my_head
1,409
Posted By bash_in_my_head
I also had to use :set list in vi to show hidden...
I also had to use :set list in vi to show hidden characters. In my case it only showed the end line character which we know is in place anyway. I cut and pasted back into my script and that is what...
1,409
Posted By bash_in_my_head
Seemingly simple sed, delete between matching lines
There are many matching blocks of text in one file that need to be deleted. This example below is one block that needs to be either deleted or replaced with an empty line.
This text below is the...
5,638
Posted By bash_in_my_head
The items to delete are in the input file. This...
The items to delete are in the input file. This script is just to prove the loop works. input is the file I want to delete from. I could use sed edit in place or not. Some internet posts said the...
5,638
Posted By bash_in_my_head
input file contains one two three four ...
input file contains
one
two
three
four

I moved away from the array to an input file. The script hangs as shown here.
#!/bin/bash -x


for i in `cat input`
#while true
do
sed -e...
5,638
Posted By bash_in_my_head
sed to delete items in an array from a file
I need to create a shell script to delete multiple items (Strings) at a time from a file.

I need to iterate through a list of strings.

My plan is to create an array and then iterate...
11,578
Posted By bash_in_my_head
Csv download in a bash script
I am attempting to download a url in csv format. When I download this url in a browser excel opens up and automatically populates with comma separated values.

When I try to use curl or wget I get...
Forum: Programming 12-09-2014
2,344
Posted By bash_in_my_head
What is the ruby main method?
I am trying to obtain documentation using ri on my local machine. If I dont require any method in my script and I want to find information on .value or .inspect or anything that is native without...
Forum: Programming 11-14-2014
1,688
Posted By bash_in_my_head
Python tar script; no errors; no output
This script produces no errors. It also does not produce an output file. Any ideas?

#!/usr/bin/python

import tarfile

output_filename = 'etc.tar'
source_dir = '/etc/'

#To build a...
1,176
Posted By bash_in_my_head
Extracting lines from a file with sed and awk
My source file is structured with two words on each line
word1 word2
word1 word2

I am using sed and awk to grab groups of specific lines
line=`awk 'NR>=4 && NR<=7' file1`; echo $line...
1,856
Posted By bash_in_my_head
#!/bin/bash Now I would like to iterate through...
#!/bin/bash
Now I would like to iterate through two arrays.
array3=(12 13 14 15 16 17 18 19 20 21 22 23 24 25)
array4=(13 14 15 16 17 18 19 20 21 22 23 24 25)

for i in ${array3[@]} && for q in...
1,856
Posted By bash_in_my_head
I am trying to match a date when the date on the...
I am trying to match a date when the date on the right side which will be 12-21-year. I want a match. the date on the left will

so I want 12-30-12 = 12-30-12 to match and when they do I would...
1,856
Posted By bash_in_my_head
if then else; no variable match but statement executes anyway.
My first then statement is executing even though there is no match between the variables. each subsequent if then statement is also executing.

Why do they execute when there is no match in the...
13,902
Posted By bash_in_my_head
works! thanks!
Works like a charm! thanks
13,902
Posted By bash_in_my_head
exact string match ; search and print match
I am trying to match a pattern exactly in a shell script. I have tried two methods

awk '/\<mpath${CURR_MP}\>/{print $1 $2}' multipath

perl -ne '/\bmpath${CURR_MP}\b/ and print'...
2,233
Posted By bash_in_my_head
sudo command output
Yes i tried this command from the shell and it does work, but not in the script.
Thanks for this tip Now that i reset num to NUM that portion works.


here is the shell output.
sudo raw -q...
2,233
Posted By bash_in_my_head
I also am looking for a way to execute this...
I also am looking for a way to execute this command but the num variable does not get passed example

VAR=` sudo raw -q /dev/raw/raw${num}`

echo $VAR



does not print out the contents of...
Showing results 1 to 25 of 33

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