Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: SteveR77
  • Content: Threads
  • Order by date
  1. SteveR77

    Variable assignment?

    When I take the following and attempt to have parameters passed I end up with File Path errors. $command = { dnscmd PS_Server /RecordDelete myzone myhost A 192.192.192.192 /f } Invoke-Command -ComputerName PS_Server $command Change that fails and produces errors - $command = { dnscmd...
  2. SteveR77

    Create Powershell Script from Invoke-Command

    I am new to PowerShell but I have been able to work with DNS entries using the following command line commands but when I attempt to place them in a PowerShell script I get a File Path error. Would someone enlighten me as to where I am going wrong? This is a small part of a larger project with...
  3. SteveR77

    Passing SED variable

    This is one of those things that always seems to bite me. I have the following in my script - sed -i '284s/"[^"]*"/"mclane.com mclane.mclaneco.com"/g' <filename> I need to configure the command so the 284 line number can be read as $ln in case the file gets modified and the line number that...
  4. SteveR77

    NFS Stale Mount Check

    I am currently working on the logic associated with testing for stale NFS mounts in my environment. However, I am at a lost as to why the loop in my first case condition only gives me the first value from the file being passed then drops back to the menu options. I am aware that the stale...
  5. SteveR77

    Unexpected Sum with AWK

    I have the following code - #!/bin/bash # while read line do awk -F":" -v frdt=$(date --date="$line" +%Y:%m:%d) '(substr($0,1,10)==frdt) { count++} { tbytes+=$12} END {print frdt ", " tbytes/1073741824 ", " count }' /usr/roc/om/server/adm/activity_log done < DATES I expected the...
  6. SteveR77

    Filtering Off In AWK summary

    I am attempting to use AWK to generate a single line summary given a date range. Currently, the values are hard coded but the intent is to pass the formatted date values. Right now I am getting the last value in the file but I am not seeing where the filtering is off in the following code...
  7. SteveR77

    thread80-1726967

    The issue of perserving timestamps with FTP is tricky at times. One option that has worked for me is to have the user tar the files then ftp the tarball. Once recieved when the files are untarred the timestamps will be preserved. I realize this adds another level of complexity but it has...
  8. SteveR77

    Conditionally adding a column of output

    I know this should be easy but I am not seeing a clear answer to this. I have a data file with 15 fields of data. Field 15 can contain data that is 0000000000_XX or XXQQQQQQ. What I want to do is check the field for the underscore and return the last two characters if they exist otherwise I...
  9. SteveR77

    AIX using ed to perform in place editing

    I am battling with an old AIX server and old version of KSH to create a script that will toggle comments in a file in order to update which server is active. The issue is the here document and ed command do not execute. The script runs without errors but the subtitution that I expect to happen...
  10. SteveR77

    Solaris 2.6 - Add DLT

    I know this should be simple but the admin docs for Solaris 2.6 are not available to me in my environment and I have a E450 system that I need to add a DLT drive to. Commands such as probe-scsi do not work so I am stumped as to how in this arcane OS I can achieve what I need to. Thanks for...
  11. SteveR77

    Telnet prompt access SUN systems remotely

    I have recently installed Avocent's Cyclades ACS in my environment and have connected four SUN servers to it. 2 systems are E250 and 2 are Netra T1s. When I telnet to the advanced console server and pass the port number for 3 of the 4 servers it appears that the connection hangs until I send a...
  12. SteveR77

    Serial Console access to T2000

    I've inherited a Sunfire T2000 server from the previous SA but I have no clue how this system has been configured. In attempting to use serial console to access the system this have proven to be an exercise in sheer frustration. I have attempted to use minicom from a Linux system using the...
  13. SteveR77

    Escaping the asterisk is failing

    I know that this should be straight forward but for some reason it is not. I have a variable where I am attempting to store my SQL string but for some reason the command line is doing odd things when I attempt to escape the asterick. The assignment is as follows: FILE=$(echo "unload to...
  14. SteveR77

    Passing an input file to userdel -r

    Currently I have the following script and I am merely looking for validation before I execute it in my environment - #!/usr/bin/ksh while echo "Enter user to delete or CTRL-d to quit: \c" read username do echo $username >> userlist.txt done echo userdel -r < userlist.txt What I...
  15. SteveR77

    QBF query locking Access 2003

    I have a query that is being used in a QBF. When I attempt to update the query and save it. It locks up Access 2003. The query in question has 12 fields in it but I have run this type of query with as many as 15 fields in the past. I have downloaded the Office 2003 SP1 and installed it but...
  16. SteveR77

    Executing coprocess causes echo of input to be lost

    When I run a Korn shell script in Solaris that has a statement like - passwd 2>/dev/null |& Once I exit from the script I can no longer see my keyboard input even though it is still being accecpted. The only resolution that I have is to exit and come back into the environment. Thanks in...
  17. SteveR77

    Solaris 9 regular expression parser

    Using Solaris 9 and building a Korn shell script with the following statement - echo $input | sed -e 's/[^[A-Za-z0-9]]//g' The statement fails to strip any special characters from $input if they are entered. Changing the range to the POSIX option of :[alnum]: has no affect on the string...
  18. SteveR77

    Validation Issue

    In the following code the line stating if ! validAlphaNum $input ; then is never seen to do the evaluation. Can someone tell me what I have missed. #!/bin/sh # Ensures that input is only alphanumeric validAlphaNum() { # Validate arg: returns 0 for success & 1 for failure # Strip all...
  19. SteveR77

    Solaris meminfo or free command

    I know this should be easier than it is. I am attempting to find a command in the Solaris OS environment that will give me something like top, free or meminfo in the Linux enviroment. Thanks in advance, Steve
  20. SteveR77

    Reading from pipe (Korn Shell)

    I am attempting to remember what the issue is with piping data and attempting to use read to do assignment to variables. For example - print a b c | read one two three Given that the pipe should be sending a b c as Stdin to the read it seems that one should equal a, etc. I know I am...

Part and Inventory Search

Back
Top