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 TouchToneTommy 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: simpson
  • Content: Threads
  • Order by date
  1. simpson

    oneliner - insert line in file after regexpres

    I am looking to insert a line of text in a file after a specific line. I know how to do it based on the line number: #perl -pi -le 'print "New line Insertion" if $. == 100' file.txt How would i adjust the example above for inserting "New Line Insertion" on the line after my search pattern...
  2. simpson

    One Liner - Insert Text in File

    All, I am looking for a one-liner to insert text into an ascii file above a line that matches a search. Example. I would like to insert a line of text above the line End_of_Section in a file. Before: file_a ------- Start_of_Section mike julie spencer End_of_Section After: file_a -------...
  3. simpson

    SED Command - remove last comma from a file

    I am looking for sed command to remove the last comma from a given file. regardless of what line or position. Any help would be greatly appreciated. Simpson
  4. simpson

    awk to search adn delete char

    I would like to use an awk statement to do the follow. Search for a specific line in a file that contains a word and print out the 5th item. Easy enough. awk '/foo/ {print $5}' /tmp/log what I would like to do is take it one step further and truncate the result down because the data is...
  5. simpson

    Return IFS to Space

    Hello, I have a (KSH) script taht interprets different input squences and processes them. The first of which is a CSV so I have set IFS to , with: IFS=, Now later in my script I am reading input in from a grep command and would liek to |read var1 var2 var3 .... How do I set my IFS back to...
  6. simpson

    Cut piece of a String

    I am attempting to cut the first part of a filename out of a variable. Filename - servername20090201.csv servername - all characters until 200 what I am attempting to do is this --------------- i=servername20090201.csv echo $i | cut -f1 -d"200" --------------- Obviously this isn't working...
  7. simpson

    Mailx with file as an Attachment

    All, I would like to email a txt file from the command line as an attachement rather than the txt file being the body of the message. example. mailx -s "Test Email" anyone@something.com < /tmp/text_file.txt this just puts the context of /tmp/text_file.txt in the body. I want it to be...
  8. simpson

    Open Socket Connection

    I would like to find a command(s) that will allow me to get more information around an open socket connection. Capture open port information, close open ports and restart port without having to reboot. Any ideas? Thanks
  9. simpson

    Meeting Reminder Notification

    All, i would like to have a meeting reminder send me an email (to my cell phone) to remind me of meetings. I know you can set a *.wav file as a notification, but does anyone know if you can have a meeting request submit an email? thanks
  10. simpson

    Increase filesystem - chfs

    I would like to add an additional 120 meg to a filesytem. 512K block size. chfs -a size=+???? /usr. Can someone walk me through how to calculate the ???? I am having a hard time grasping the concept right now. Thanks in advace.
  11. simpson

    MAILX - email body not giving &quot;new line&quot;

    I have created a flat file from a grep | awk statement that I am passing to a mailx statement but when the email shows up it is not displaying the new line chars. I can pass the mailx statement most other files and they show up fine. i.e. /etc/hosts. When I view the file (using vi or cat) it...
  12. simpson

    Trusted Systems Syntax

    All, I have two systems, one has the ability to access the other via .rhosts. BUT yyou have to pass the username into the access commands as we do not have access to root on the remote system. The following works just perfect: rlogin srvr2 -l tstadm remsh srvr2 -l tstadm 'cat /etc/hosts'...
  13. simpson

    If condition syntax help

    All, I have a simple if statement that I am trying to get to work and my quotes adn brackets are not working. I know someone will think I am struggling with a simple thing but sometimes you have ask for help --------cut------------ if `file $file_name | grep ascii` then echo "ASCII" else...
  14. simpson

    Uname returns &quot;-t&quot;

    When I execute the command uname on my system instead of it returning HP-UX I get -t as a responce. Any idea why???
  15. simpson

    IF statement

    I would like to create an if statment that will evaluation if a variable contains a sequence. ie. does vairable 'var_a' contain 'abc' I am kind of confused as to how I would approace this. Thanks
  16. simpson

    telnet session in background...

    I am attempting to fire up a telnet session in the backgroud via a script. I am not needing to log into the session only to establish the session and create the telnetd process on the remote machine. REASON FOR SCRIPT - I am updating the kernel parm for the number of allowable telnet sessions...
  17. simpson

    What is using the SWAP Space

    Finding that my swap space is filling up quite regularily and was ondering if it is possible to findout what is being writen to swap. Thanks
  18. simpson

    make_tape_recovery During Production

    can you run a make_tape_recovery while the systems is up, running and users are accessing data/apps? Or does it require apps to be stopped, users locked out? thanks
  19. simpson

    Create Variable Name from another Variable

    I would like to create and assign a value to a variable, the name of the variable will be derived from another variable. is this possible under ksh. Thanks
  20. simpson

    start dtterm with Cat

    Simple one here that I have been scatching my head on. What to fire a dtterm and cat a simple flat file ito it. Each time I do it the window closes. thanks Mike

Part and Inventory Search

Back
Top