I am working on a small prog..
i have a file.txt which contains random data...
K LINES V4 ADD CODE `COMPANY` ADD CODE `DISTRIBUTOR` SEQ NAME^K LINES V5 SEQ NAME^K LINES V6 ADD `PACK-LDATE` SEQ NAME^K^KCOMMAND END^KHEADINFO START^KLINENUM=266781^KCOLNUM=120^KUSESMKT=1^KPERIOD=,ADD-CODE,CO,DIST,LNCH^KITEM=,,,,DATE^KPERIODNAME=MTH09/03 MAR-MAR,,,,,^KITEMNAME=UNIT(+0),BULK(+0),G,NHP(+0),YEN(+0),CLIENT^KCOLUMN=NAME(23),ADD(10),ADD(4),ADD(4) ,ADD(4)^KCOLUMNS=1,(COL(0,13),COL(0,13),COL(0,10),COL(0,13),COL(0,13),COL(0,13))^KHEADINFO END^KCHOUHYOU START
now, there is a string in this file --
i want to extract the string of next 4 charcters after
is encountered.. ie extract
and rename the whole file as
i was trying this with awk but unable to do so..
any help is highly appreciated... thanks
I am trying to rename all text files in a directory that match a pattern. The current command below seems to be using the directory path in the name and since it already exists, will not do the rename. I am not sure what I am missing? Thank you :).
Files to rename in... (3 Replies)
I have a specific set (all ending with .bam) of downloaded files in a directory /home/cmccabe/Desktop/NGS/API/2-15-2016. What I am trying to do is use a match to $2 in name to rename the downloaded files. To make things a more involved the date of the folder is unique and in the header of name... (1 Reply)
Hello guys,
I have problem with hpux shell script. I have one big text file that contains like
SOH
bla bla bla
bla bla bla
ETX SOH
bla bla bla
ETX
SOH
bla bla bla
ETX
What I need to do is save first SOH*BLA into file1.txt, save second SOH*BLA into file2.txt and so on.... (17 Replies)
Hi
This is my first post and I'm just a beginner. So please be nice to me.
I have a couple of html files where a pattern beginning with "http://www.site.com" and ending with "/resource.dat" is present on every 241st line. How do I extract this to a new text file?
I have tried sed -n 241,241p... (13 Replies)
Hi,
I have log file which rolls out every second which is as this.
HttpGenRequest - -<!--OXi dbPublish--> <created="2014-03-24 23:45:37" lastMsgId="" requestTime="0.0333"> <response request="getOutcomeDetails" code="114" message="Request found no matching data" debug="" provider="undefined"/>... (3 Replies)
Hello
I am making a script where I need to rename the files but with different names.The file name could be change according to the product
I made a logic but that is not working properly
arr=$(echo a@b@c | tr "@" "\n")
echo $arr
output is a b c
arry=$(echo d@e@f | tr "@" "\n")
... (4 Replies)
Hi,
I have a file whose contents are as follows.
2013-03-08/15:09:20.134 INFO 00000000-00000000 0034 09700400 CON_IN SessionID:ED5E1400-4805-85E2-17B2-5BE45684886A Connection
ID:ED5E1400-4805-68F1-BB1D-F06496BCF910 TO:<sip:51234999@10.239.94.146:5060 FROM:<sip:9302280716@97.208.31.7:51024... (2 Replies)
Hi,
i have a file with some data ..look for some specific value in the file and if found that value rename the file with the value found in the file..
ex..
File.txt
1236 43715825601ANDERSSON,
1236 437158256031963040120060901200609010000000
1236 43715825604123 MCCL AVE UPPER
1236 ... (11 Replies)
Hello,
I am new to shell
I have a folder which contains a list of files, all the files contain the separator :
I need to replace this character for all the filenames (by batch)
ex: hello:world should become hello-world
please help
Thanks (3 Replies)