Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: popeye
Posted By popeye
thanks ..
thanks ..
Posted By popeye
Bash : Parameter expansion ${var:-file*}
Example data

$ ls *somehost*


for x in $FILES
Posted By popeye
Regular Expressions : grab flash devices
I know its an art and it takes a little time .. but is there a better way to do this ?


Thanks in advance
Posted By popeye
Using sed to extract line of a file
Ok .. This is driving me nuts. I suppose I need another set of eyes.

Example Data

interface Vlan1
description xxxxxxxxxxxx
ip address
no ip redirects
no ip...
Posted By popeye
Thanks fellas .. Centos linux .. and I am using...
Thanks fellas .. Centos linux .. and I am using the -d .. but that doesnt give me much info related to using an "OR"
Posted By popeye
Tcl / expect need to attempt telnet if failed ssh
Morning and Happy New Year to all.

I am in a situation where I need to connect to a list of devices that are using either telnet or ssh.
I want to try to telnet, if I receive any of the...
Posted By popeye
Vi / vim - Insert a external command response
I would like to execute and external command and insert it into a particular area of the file I am editing. Note that I have the ORIGINAL AT&T vi training doc dated 1987. Doesnt explain it.

As an...
Posted By popeye
qiven the quoted source in my original post ...
qiven the quoted source in my original post

The output could be

It is matched because 4 instances of "Normal" were found.

or it could be
because only 3 instance of "Normal" were found.
Posted By popeye
BASH - Regular Expressions :Looking for one word on multiple lines.
Im looking for a bash solution that will use Regular Expressions (not perl, sed or awk) to check the example data below and then give me a status.
which would be just simply Match or Mismatch.

Posted By popeye
Pipe to basename
I would like to use basename with wc .. I know I can use awk, but want to use basename.

Change this

wc -l txt*
106 /home/popeye/txt1
154 /home/popeye/txt2
159 /home/popeye/txt3
420 total
Posted By popeye
DOPEY !!!! I stripped down everything that wasnt...
DOPEY !!!! I stripped down everything that wasnt really needed for the forum and posted.

I grabbed the script lines I posted on the forum and ran that on the work VM. Worked fine but still...
Posted By popeye
Im editing with vi. Ive :set list and dont see...
Im editing with vi. Ive :set list and dont see any extraneous items in the script files on the VMPLAYER VMs. I will also double quoted all the vars when I get to the case. Yep. At the time I was...
Posted By popeye
VERY INTERESTING ! Ive tried this on a VM...

Ive tried this on a VM at school, a Ubuntu VM on my latptop and a Centos VM on my laptop.

What happens on all is that as I run through and test each option, at one point...
Posted By popeye
Bash : While Loop behavior
Good Morning

I think there may be something I dont understand fully.

The following code works well, but I dont like the set domen method.

while [ "$domen" ==...
Posted By popeye
Sorry fellas, Being in the expert bucket I...
Sorry fellas,

Being in the expert bucket I figured you guys would "see" it. ... and if you execute the script I provided you will see that it actually works and the desired output is shown. No...
Posted By popeye
BASH Internal : Replace pattern with string without external command
I'm trying step up my scripting game .. :rolleyes::confused::D

Is there a way to do the replacement with an or without using an external command ?

I did try but no joy.

Posted By popeye
TCL - quotes inside a string assigned to a var
I know that

set line "This is a line."

puts whats between " inside the var line.


How do I do the same for

set line "This is a line "with quotations" inside the string."
Posted By popeye
Redirect output to memory instead of an external file
I use the following as an example. I find myself always doing this and I believe my scripts would run much faster if I put the sed results into a place in memory rather than writing to files. Again,...
Posted By popeye
ksh Loop through file one, remove lines from file two
Good Afternoon,

I start with a file named biglist.txt.
I have another file smallerlist. txt

I want to remove the lines from smallerlist.txt from biglist.txt and leave those lines that do...
Posted By popeye
BASH- Hold script until all contents of a file is written
I have to hit a very large database to pull fields of information.

I have a script that runs multiple instance of the same query against the data base and writes contents to a file.

Posted By popeye
Expect : appending to log_file $my.log
Inside a script, I defind a log file.

log_file -a $x.log

My question is :

Shown for illustration - this doesnt actually work -- Is there a way to

puts "this is appended text" $x.log
Posted By popeye
Sweet !! That was exactly what I was looking for...
Sweet !! That was exactly what I was looking for ... simple easy to understand.

Thanks again !!
Posted By popeye
[Solved] Shell : Can someone show me how to used these ?
removes the shortest suffix of $var patching pattern
removes the longest suffix of $var patching pattern
removes the shortest prefix...
Posted By popeye
ksh sed - Extract specific lines with mulitple occurance of interesting lines
Data file example

I look for primary and * to isolate the interesting slot number.

slot=`sed '/^primary$/,/\*/!d' filename | tail -1 | sed s'/*//' | awk '{print $1" "$2}'`

Posted By popeye
Thanks to all for the input. Using...
Thanks to all for the input.

Using (basiclly) sea's solution.
No ... this isnt homework.

This did bring up another question. Ill post in different thread.

Thanks again to all .. this...
Showing results 1 to 25 of 101


Featured Tech Videos

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