Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: sumguy
725
Posted By sumguy
Thanks guys !!
Thanks guys !!
725
Posted By sumguy
Bash : Checking Large file for specific lines
Morning ..

I have a file with approximately 1000 lines. I want to check that the file contains, for example, 100 lines.
Something like whats given below is ugly. And even if I create a function...
1,640
Posted By sumguy
Tsch .. thanks. You guys are wizards :) ! ...
Tsch .. thanks. You guys are wizards :) !

Cant quite put it all together. Maybe someday when I grow up Ill be a wizard too !!

Thanks fellas !!

---------- Post updated at 02:10 PM ----------...
1,640
Posted By sumguy
Bash : More parameter expansion and IFS
I am trying to become more fluent with the interworking of bash and minimize the number of external calls.

Sample Data. This will be the response of the snmp query.

SNMPv2-MIB::sysName.0 =...
1,698
Posted By sumguy
Bash Parameter Expansion
#!/bin/bash
SNMPW='/usr/bin/snmpwalk'
while read h i
do
loc=$($SNMPW -v3 -u 'Myusername' -l authPriv -a SHA -A 'Password1' -x AES -X 'Password2' $i sysLocation.0 2>/dev/null)
loc=${loc:-" is not...
1,019
Posted By sumguy
awk Behavior
Linux Release


Uname details


Data file


Ive been at the command line for some time. Back as far as SCO and Interactive Unix. I have always used this construct without issues. I want to...
1,139
Posted By sumguy
Yes. is for (only the first occurrence ...
Yes.

is
for (only the first occurrence following is )
1,139
Posted By sumguy
Using sed to Find first string, then next string
I know that if file is
now
is
the
time
for
all
good
men
house
boat
car
for



sed -n -e '/is/,/for/p' file


will print
1,478
Posted By sumguy
Perl : Large amount of data put into an array
This basic code works.

I have a very long list, almost 10000 lines that I am building into the array. Each line has either 2 or 3 fields as shown in the code snippit. The array elements are...
779
Posted By sumguy
Ok yeah. Thanks again.
Ok yeah. Thanks again.
779
Posted By sumguy
Thanks you very much MadeInG .. that worked. ...
Thanks you very much MadeInG .. that worked.

I didnt have my notebook yesterday. I looked this up last night.

why doesnt print grep /\Q$ARGV[0]\E/, @lines work ?


Got that written down in...
779
Posted By sumguy
Checking has for a command line argument
I would like to search and print a match of the user entered $ARGV[0].
Im terrible with hashes and really dont know where to go from here.

The example data file

name location ...
808
Posted By sumguy
Expect/tcl (not perl) logging troubles
My logs aren't correct. Im trying to log failure and successes, then use the resulting successes file "seed" to perform another function. Problem is that the log has only a single random entry.
...
1,426
Posted By sumguy
Thanks you. ---------- Post updated 05-14-13...
Thanks you.

---------- Post updated 05-14-13 at 10:10 AM ---------- Previous update was 05-13-13 at 02:40 PM ----------

Ok this was working yesterday .. not sure why its not working today ... ...
Forum: Red Hat 05-14-2013
717
Posted By sumguy
Loading Expect
I need to get expect/tcl loaded on a Linux machine I have access to.
Im not an admin so Im not sure what to ask for.
Here is what we are running ... a Redhat clone from what I understand.


...
1,426
Posted By sumguy
Perl Question Grep and exit status
Im being forced to write in perl. I prefer KSH or Expect, so I suppose its time to become more fluent with perl.

I have the following problem. I want to loop through Filea and check that each...
5,492
Posted By sumguy
Hey RudiC .... I havent tried this yet. They...
Hey RudiC .... I havent tried this yet. They just reimaged my Laptop with win 7 and my access to everything is hosed. Been working on that ... as soon as Im back up, Ill give this a try ...
...
5,492
Posted By sumguy
You are absolutely correct. Dang cut and paste...
You are absolutely correct. Dang cut and paste makes ya lazy .. lemme edit and fix.
5,492
Posted By sumguy
Sed: Splitting A large File into smaller files based on recursive Regular Expression match
I will simplify the explaination a bit, I need to parse through a 87m file -


I have a single text file in the form of :


<NAME>house........
SOMETEXT
SOMETEXT
SOMETEXT
.
.
.
....
6,563
Posted By sumguy
Thanks for the solutions guys. I was trying to...
Thanks for the solutions guys. I was trying to figure this out for 2 days.
6,563
Posted By sumguy
Use sed to add comma to end of first field
Example data
Gi1/10
Gi1/12 xl32lytscb07
3/11 to nyc
3/12 41764 ecomm
3/13 hxcsxsa 2/1
3/14 ziim570-rsvd
3/15 xl3NDSADM
Po1 VPC trunk to xl3-i
Po2 ***DO...
5,256
Posted By sumguy
/dir/dir/dir/dir/filename why not just ...
/dir/dir/dir/dir/filename

why not just

echo '/dir/dir/dir/dir/filename' | awk '{FS="/"}{print $6}'
4,149
Posted By sumguy
check for successfull telnet session
In either case using ksh or tcl, how can I check that I have a successfule telnet session and am being prompted with a tacacs login prompt ?
:confused:


DOIT () {
sleep 2
echo "<tacacs name...
Showing results 1 to 23 of 23

 

Featured Tech Videos

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