Sponsored Content
Operating Systems Solaris Generating a generic incremental code Post 302208705 by ramky79 on Tuesday 24th of June 2008 03:24:34 PM
Old 06-24-2008
Generating a generic incremental code

Hi Gurus,

I have several Solaris systems (say system a, system b,system c) which will connect to a windows system (system Z) using SFTP session.

I have a 'txt' file on System Z , which has a simple numeric value on it(say 1) , If I have to increment this number with 1 (1+1 =2) irrespective of the source system . how do i do this.

Ex: I connect from system a to system Z , read the txt file get the number 1 , increment this number to 2 (1+1=2) . When I connect from system b or system c the number in txt file to be read should be 2, this number is once again incremented to 3 (2+1=3).
The Challenge: I'm unable to increment the file using the sftp session.

Please shed some light....

Thanks
Ram.
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

why is this code generating syntax error?pls help

#!/bin/sh copy() { source=`stat -c %s $1` dest=0 cd $2 while ;do cp $1 $2 & pct=`((100 * $dest) / $source )` dest=`dest+1` echo -en ".$pct%\b\b\b" sleep 1 done } echo "starting now" copy /file1 /tmp (3 Replies)
Discussion started by: wrapster
3 Replies

2. UNIX for Dummies Questions & Answers

incremental backup

Hi All.. i am trying to write a script which will give the incremental tar backup of all files with latest timestam. i tried with find -mmin -2 but if it takes half on hour or something to creat the tar itself, then no meaning in using the above command. so please help me to find the... (2 Replies)
Discussion started by: Usha Shastri
2 Replies

3. UNIX for Dummies Questions & Answers

incremental by 1

let says, i have this number as 000002080, i want to add 1 to make it 000002081, and then i want to add 1 to 000002082, add 1 to 000002083, 84. i=000002080 TOT=$(echo "scale=9; $i + 1" | bc) echo $TOT it shows 2081, i want to retain 000002081, 000002082, 000002082, 000002084. (2 Replies)
Discussion started by: tjmannonline
2 Replies

4. Windows & DOS: Issues & Discussions

Incremental Backup

I have a folder /root/test in a centos 5.3 system. I want to take an incremental backup of the contents of the folder in the C:\Downloads folder of a windows system present in the same lan as the linux system. What are the ways of executing this plan? Kindly help (0 Replies)
Discussion started by: proactiveaditya
0 Replies

5. Shell Programming and Scripting

FULL or INCREMENTAL ???

Hi. Can someone tell me if the following script that i have made is a script for INCREMENTAL BACKUP or FULL BACKUP. My teacher told me that is doing an FULL BACKUP. • find /etc /var /home -newer /backups/.backup_reference > /backups/.files_to_archive • touch /backups/.backup_reference • tar... (1 Reply)
Discussion started by: bender-alex
1 Replies

6. Shell Programming and Scripting

auto-generating assembly code by variables found by script

Hi everybody I'm working on a list of registers(flip-flops to be exact), now i need to extract some value from this list and use them as arguments to pass them to some assembly code for example i have: 118 chain79 MASTER (FF-LE) FFFF 1975829 /TCK F FD1TQHVTT1 ... (1 Reply)
Discussion started by: Behrouzx77
1 Replies

7. Shell Programming and Scripting

Delimiter Conversion(Generic Code)

Hi All, I am looking for a generic code which can search for the existing delimiter(what ever it may be) in a file and convert it to Pipeline. The file may have Pipeline delimiter already in that case just leave it. Please find below some sample records. Sample records1: ... (2 Replies)
Discussion started by: Arun Mishra
2 Replies

8. Shell Programming and Scripting

Incremental numbering?

Would it be possible for a script to duplicate a file and incrementally number it? File in: XXX_007_0580_xxxx_v0016.aep File out: XXX_007_0580_xxxx_v0017.aep If someone knows of a way I'd love to see it. Thanks! (7 Replies)
Discussion started by: scribling
7 Replies
GETSID(2)						      BSD System Calls Manual							 GETSID(2)

NAME
getsid -- get process session LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <unistd.h> pid_t getsid(pid_t pid); DESCRIPTION
The session ID of the process identified by pid is returned by getsid(). If pid is zero, getsid() returns the session ID of the current process. RETURN VALUES
Upon successful completion, the getsid() system call returns the session ID of the specified process; otherwise, it returns a value of -1 and sets errno to indicate an error. ERRORS
The getsid() system call will succeed unless: [ESRCH] if there is no process with a process ID equal to pid. Note that an implementation may restrict this system call to processes within the same session ID as the calling process. SEE ALSO
getpgid(2), getpgrp(2), setpgid(2), setsid(2), termios(4) HISTORY
The getsid() system call appeared in FreeBSD 3.0. The getsid() system call is derived from its usage in AT&T System V UNIX. BSD
August 19, 1997 BSD
All times are GMT -4. The time now is 08:25 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy