Search Results

Search: Posts Made By: Vryali
2,080
Posted By Vryali
Help with PowerShell
I am very not knowledgeable with regards to Windows, and even more so with PowerShell, but I'm hoping someone can help me with what should be a fairly simple script.

Remove all local accounts...
4,714
Posted By Vryali
This is in AutoSys? Why don't you just create a...
This is in AutoSys? Why don't you just create a box job with 3 file watcher jobs who have dependencies on each other? Unsure if you have the few job types available in 11.0 or the many in 11.3, but...
1,597
Posted By Vryali
You can make this as safe as you want, but as a...
You can make this as safe as you want, but as a quick one liner:

if [ `find ~/Temp -mmin -60 | wc -l` -eq 0 ]; then echo "0 files found in ~/Temp!" | mail -s "ERROR: Something bad" admin@abc.com;...
5,169
Posted By Vryali
Install nmon and read up on that. Great for...
Install nmon and read up on that. Great for stuff like this.
3,376
Posted By Vryali
Turn on debugging and take a look at the output? ...
Turn on debugging and take a look at the output? Only other guess I'd have is maybe python is doing strange things, or adding in some characters that are messing up your expect statement? ...
1,560
Posted By Vryali
Bourne: $0 issues when sourcing files
Problem in simple script form:

File 1:
# cat test.sh
#!/bin/sh
echo "Running test.sh - \$0 is $0"
echo "Sourcing test2.sh"
. ./test2.sh
exit
File 2 (Sourced file):
# cat test2.sh...
Forum: AIX 10-19-2012
1,777
Posted By Vryali
Thanks so much mate, in case anyone else wants...
Thanks so much mate, in case anyone else wants the oneliner (I'm just making it into functions and going to put it in the profiles)

Recreate:
HOST_ID=3 && lsmap -vadapter vhost${VHOST_ID} | awk...
1,887
Posted By Vryali
$ cat test 518t-rw-r--r-- 1 emily us_cms...
$ cat test
518t-rw-r--r-- 1 emily us_cms 101348458 Oct 8 16:43 vgtree_518_0_LHB.root
518t-rw-r--r-- 1 emily us_cms 101348458 Oct 8 17:04 vgtree_518_0_YTs.root
518t-rw-r--r-- 1 emily us_cms...
Forum: AIX 10-19-2012
1,777
Posted By Vryali
Simple AWK cleanup/questions AIX
I have an unfortunate need to redo a bunch of disk settings on a VIOS on AIX, so I was putting together a quick script to scrub everything it has, make the changes, and then put the mappings back. ...
8,009
Posted By Vryali
You say Linux, have you considered using tmux? ...
You say Linux, have you considered using tmux? It's superior to screen in everything I've ever used it for. I've actually got my tmuxrc mapped to work more similarly to the binds I've used from...
4,459
Posted By Vryali
Host key verification is probably just telling...
Host key verification is probably just telling you that the hostname you're hitting showed a different key in the past. SSH manually and the error should probably pop up, then just delete the...
2,282
Posted By Vryali
ZSH Colors on AIX7
I'd put together a zshrc for use on Linux & AIX 5/6 at another shop that worked fine, but when I tried to put it on here it messes up the colors for some reason I can't understand.

I used Phil's...
2,546
Posted By Vryali
Definitely doesn't work off-the-bat with 10, at...
Definitely doesn't work off-the-bat with 10, at least - however I didn't know about the xpg4 binaries and that version of sed -did- work, so I'm good to go. Thanks a lot!
2,546
Posted By Vryali
Thanks so much, that's what I was looking for. ...
Thanks so much, that's what I was looking for.

Edit: It works on Linux & AIX (Pretty sure it's running off GNU SED), doesn't work on Solaris by default. Any tips on Solaris, or alternate...
6,669
Posted By Vryali
Well, think this'll work - if you need more...
Well, think this'll work - if you need more complicated directory matching you could just get the entire list of directories and then use grep -v instead of the find -type d:

#!/bin/sh...
2,546
Posted By Vryali
[SOLVED] SED: Pattern repitition regex matching
Fairly straightforward, but I'm having an awful time getting what I thought was a simple regex to work. I'll give the command I was playing with, and I'm aware why this one doesn't work (the 1,3 is...
1,606
Posted By Vryali
Probably readability, even without comments you...
Probably readability, even without comments you know what the sed statement is doing due to the variable name.



Edit: Hipe has the way you probably should do this.

It's because $ is a...
3,245
Posted By Vryali
Test file: $ cat test paul, Paul Smith,...
Test file:

$ cat test
paul, Paul Smith, Stevn Smiley, REQ000001, ARS (11)
sam, Sam Martin, Stevn Smiley, REQ000001, ARS (11)
mike, Mike Conway, Stevn Smiley, REQ000001, ARS (11)
mike, Mike...
3,893
Posted By Vryali
I've never used -o, but it looks like you're just...
I've never used -o, but it looks like you're just trying to pull out some regex?

PROTOCOLS=`$EGREP -v '^[ | ]*#' | sed 's/.*\(REGEX\).*/\1/'`
11,647
Posted By Vryali
Think this should do you: $ awk -F'.'...
Think this should do you:

$ awk -F'.' 'int($2)>'201206000000' {print $0}' test.sh
abc.201206015423.txt
abc.201207013456.txt
7,657
Posted By Vryali
Kindly ensure you don't go and use this for...
Kindly ensure you don't go and use this for malacious purposes. Bear in mind that most production environments will have some kind of log parsing program in place to catch (and sometimes blacklist)...
18,860
Posted By Vryali
That's just not how if statements work in expect,...
That's just not how if statements work in expect, if I'm reading it right. Most of your checks come down around like the below:

I don't have expect handy this second, but I think this would be...
1,641
Posted By Vryali
Lots of whats to do this, but simply done like...
Lots of whats to do this, but simply done like this:

$ cat *.html | sed 's/\(.*taskid=\)\([0-9]*\)\(.*$\)/\133528\3/g'
http://unix.com/cgi-bin/task?taskid=33528&task.out...
Forum: What is on Your Mind? 07-24-2012
1,580
Posted By Vryali
Fun things to put in comments in scripts?
Approaching the end of my portion of some STIG/DOD compliance automation and I was challenged by a co-worker to include a story in my code. There are blocks of code that need to be kept the way they...
10,189
Posted By Vryali
I'm really not certain if this is what you're...
I'm really not certain if this is what you're looking for, if it's not please provide a little more info:

#!/bin/sh
start_number=1
current_number=0
errfound=0
errfiles=""


for file in $(ls...
Showing results 1 to 25 of 61

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