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: *

  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

    Thanks, I acutally have this one bookmarked along side my Awk one liners and Perl one liners. I just can't seem to solve this "simple looking" problem.
  3. 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 -------...
  4. simpson

    SED Command - remove last comma from a file

    Fantastic. Greatly appreciated!!!!!
  5. simpson

    SED Command - remove last comma from a file

    sorry for the x-post. won't happen again. -----Input---- "tcp:120.248.242.61:2059,tcp:120.62.243.23:2061" }, "/KM/PAM_GET_CONFIG/destinationServer" = { REPLACE = "148.98.252.101 3181 patrol HEB3C9F9T3A903CEDB6AE9862F05BCE7AE7AA76" }, ~ -----Output----...
  6. 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
  7. simpson

    awk to search adn delete char

    awk '/foo/ {gsub("[][]","",$5);print $5}' /tmp/log FANTASTIC. Thank you very much.
  8. 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...
  9. 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...
  10. simpson

    Cut piece of a String

    servername="$( echo "$filename" | sed 's/200.*//' )" THIS WAS PERFECT... Thank you so much.
  11. 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...
  12. simpson

    Mailx with file as an Attachment

    Thanks guys, this is exactly what i needed. Greatly appreciated.
  13. 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...
  14. 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
  15. simpson

    Meeting Reminder Notification

    old version of outlook. Looks like another good reason to upgrade. Outlook 2003 SP2
  16. 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
  17. simpson

    Increase filesystem - chfs

    Thanks for simplifying this for me. Greatly appreciated
  18. 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.
  19. 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...
  20. simpson

    Trusted Systems Syntax

    Thank you very much. This is exacly what I was looking for.

Part and Inventory Search

Back
Top