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. lenjturnbull

    Need direction inserting variables in a line

    I have inserted text in a line with no problem but i am lost when trying to put a variable example (A$) in a line of a file example perl -i.tmp -p -e 'print "$A$\n" if /THR/' $file.tmp the line show up blank but inserted before THR the variable is loaded right before this line of...
  2. lenjturnbull

    Inserting line in a file

    I have a file where I am reading through directories then files. I read each line and find a match = THR I want to insert a line before only this in the file. I have tried different perl commands -i but only get blank lines to appear. thanks, for any assistance Len Turnbull
  3. lenjturnbull

    Setting up generic FTP multiple locations

    I am using a current FTP script and trying to attach a generic script to send to multiple locations based on flags and counters. I want to add it at the time that FTPing takes place but I am getting an error. I am not sure I am setting up the 2nd script properly. Example :ftpscript >$FTPLOG...
  4. lenjturnbull

    Variable formatting inquiry

    I am trying to build one variable from information gathered in a script. example: var1=abcdedfg need to pad this to 15 characters var2=file name need to pad this to 256 characters var3="set id" (3chars always) var1 and var2 can change all the time I want to be able to...
  5. lenjturnbull

    Formatting Variables

    I am attempting to collect data and format one variable. I have SYS + var1 (could be up to 15char) + var2 (could be up to 256char). The var2 is a file name and can have from 1 to 256 chars. I am putting this scenario together and inserting it at the beggining of each line to pass to another...
  6. lenjturnbull

    Creating File names inside script

    I am splitting information inside a script and want to establish a file name from data read. Right now I have a script that separates and fills a file but the file name is one I create. In the file I am reading the 2nd text line(record) has the 9th field that I want to id the file. I am...
  7. lenjturnbull

    Need direction, moving data from inside file to a separate file

    I have many records in file but these records are associated with each other : example a1,a2,a3,a4,a5,a6,etc... then a1,a2,a3,a4,a5,a6,etc... then a1,a2,a3,a4,a5.... and so on. I want to be able to read through the file and move a1,a2,a3,a4,a5,a6,etc... into its own file. then read on and...
  8. lenjturnbull

    date manipulation and filename

    I am in need of pointers or help. I am setting up in ksh script two filenames, one with current date = dttm attached at the end of a variable to designate file (tmsmtp=/dir/.filename$dttm) I need to setup2nd file name with date manipulated less 10 minutes (tmsmtp1=/dir/.filename$dttm??)...
  9. lenjturnbull

    operations

    I am checking files and time stamps to determine older than current time. I am not sure on the format ??? -ot is older than but I tried using -le less than or equal to , is this only for mathematics ???? Thanks for any help. Maybe you can point me to a site that has these definitions. I...
  10. lenjturnbull

    Deleting lines not wanted in a file

    I am new to the scripting game. I want to be able to read through an entire file and eliminate records not wanted. Example: 1st record has 9 15 fields the 9th field has customer id 2nd record thru the last record are associated with cust. last record is id'd in 1st field then the records...
  11. lenjturnbull

    Insert line in file through script

    I am looking for an easy instruction to insert text into a file where the record starts with a "QH1" specific text. the file is on a RS6000 box and its all text with variable lengths. Anyone with a solution ???

Part and Inventory Search

Back
Top