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...
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
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...
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...
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...
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...
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...
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??)...
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...
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...
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 ???
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.