list of files available in server 1 in path /home/xxx/src are:
a sequence file name is maintained which is in the path /ab_app/xx/seq
Rule: Get the latest sequence value from the file for xx ie, 002.increment it by 1 (it will be 003) and store it in a variable.Make another copy of the file in /home/xxx/src renaming the file like below:
003 -> is the incremented number here.
Also, update the file XX_SRC_20130417_003.txt content with the incremented value
sftp the newly created file.
If sftp is successful (used scp command to transfer files) for all the newly created two files sent( sent to server 2 , path: /extract/src/xx) then only update the content of val.txt with the incremented value.
After update, It should be something like:
Remove the files below from /home/xxx/src(server1) no matter whether sftp is succeed or failed
Need your help and guidance to get the desired output.
Thanks in advance.
---------- Post updated at 03:19 PM ---------- Previous update was at 02:24 PM ----------
I have made a draft of my approach something like below:
I am new to unix world. I need your help here.
Hello,
I have two files to be treated.
First file:
col1 col2 col3 col4
Second file:
colbis
- I try to add the unique column of the file 2 towards the file 1.
- To obtain the following result with a shell script ksh:
col1 col2 col3 col4 colbis (4 Replies)
Hi,
I have 1000 text files in a folder that are labeled data1.txt all the way to data1000.txt. I want to write a small script that manipulates the text files in this way:
(1) cut the 2nd and 9th columns of the text files
(2) sort by the numerical value in the 9th column
(3) then save the rows... (3 Replies)
I have a script where the the 9th line looks like this:
$filename=sprintf("250.1chr%d.ped", $N);
I want to modify this script 1000 times, changing 250.1chr%d.ped to 250.2chr%d.ped, 250.3chr%.ped.......and so on all the way to 250.1000chr%d.ped and store each output in files called
... (4 Replies)
I am writing a shell script for some purpose. I have a variable of the form -- var1 = "policy=set policy"
Now I need to manipulate the variable var to get the string after index =. that is i should have "set polcy". Also I need to to this for many other variables where the value of "=" is not... (3 Replies)
Hello,
I have a file with following contents :
WSL SRVGRP=LISTENER SRVID=2
CLOPT="-A -t -- -n 0x0002aa050a03cc65 "
RQPERM=0660 REPLYQ=Y RPPERM=0660
MIN=1 MAX=1 CONV=N
I need to print only the value in Hex i.e.... (2 Replies)
Hi, I have a slight problem in trying to manipulate the text within a file using the "sed" command in that the text i need changed has "/" slashes in.
I have a .sh script that scans the "/db/sybbackup/" directories for any .dmp file older than 2 days and then to >> the information to a file called... (3 Replies)
Hi everybody:
I have a problem. I have a output files which have this pattern:
number1
--space
block1a - 7rows/10columns/65elements
--space
block1b - 7rows/10columns/65elements
--space
block1c - 7rows/10columns/65elements
--space
number2
--space
block2a - 7rows/10columns/65elements... (0 Replies)