Search Results

Search: Posts Made By: berlin_germany
10,007
Posted By berlin_germany
Following works fine, #!/bin/ksh ...
Following works fine,

#!/bin/ksh

credit_sum=`awk '{ value=substr($0, 74, 14); if(value>0) {credit+=value}} END {print credit}' filename`
...
10,007
Posted By berlin_germany
I think, following will solve the problem, where...
I think, following will solve the problem, where I don't care about position of '+' and '-' signs in the values. I can just check values > 0 and the rest, and according to that sum them in 2...
10,007
Posted By berlin_germany
Thanks jim mcnamara for the reply. It works fine,...
Thanks jim mcnamara for the reply. It works fine, when values are left justified. But, I have right justified values in the file. So, '+' OR '-' can start at any position from 74 to 87 bytes.

How...
10,007
Posted By berlin_germany
Help in adding positive & negative values in a column
Hi Gurus,

In my file I have an amount field from position 74 to 87, which contains values starting with '+' as well as '-'. I want to add all positive values in a varible called "CREDIT" and all...
26,647
Posted By berlin_germany
Gurus, I am also having the same questions....
Gurus,

I am also having the same questions. I want to compare only filenames (not content, size etc.). If names are not equal, then I want to quit the programm, if equal than I want to proceed....
10,174
Posted By berlin_germany
Thanks a lot Mark Thomas, milhan and Glenn Arndt ...
Thanks a lot Mark Thomas, milhan and Glenn Arndt for your good solutions, it worked for me. Have a great weekend!
10,174
Posted By berlin_germany
deleting empty files in a directory
Hello Gurus,

I want to delete only empty files (files with 0 bytes) at once from the local directory. Rightnow I need to go through all the files one by one manually and check the empty files...
8,697
Posted By berlin_germany
Thanks a lot anbu23 ! It works fine.
Thanks a lot anbu23 ! It works fine.
8,697
Posted By berlin_germany
unix command to insert double quotes
Hi, I am looking for a unix command which inserts double quotes around all values in a text file. For example,

Input:
1234 200 4686 3506056
9646 457 5647 5066762
5656 366 5869 5978459
...
25,957
Posted By berlin_germany
Following FTP steps has solved the problem. ...
Following FTP steps has solved the problem.

ftp -vn $HOST <<END_SCRIPT > $LOG/delete_files.log 2>&1
quote USER username
quote PASS password
bin
prompt off
cd $PICKUP
mget *
bye
END_SCRIPT...
25,957
Posted By berlin_germany
FTP multiple files from remote server to local server
Hi,

I am facing a weired problem in my FTP script. I want to transfer multiple files from remote server to local server everyday, using mget * in my script. I also, want to send an email for...
5,990
Posted By berlin_germany
Even after using if....then....else....fi in my...
Even after using if....then....else....fi in my code I am not getting any mail messege. I think, somehow "mailx -s" in above script is not working. I don't know, why? Because the same mail command...
5,990
Posted By berlin_germany
Thanks again Srikanthus2002. I modified the...
Thanks again Srikanthus2002. I modified the script as below and now it's working fine. I am able to copy multiple files in 2 seperate time stamped directories. Now, the problem lies in getting a mail...
5,990
Posted By berlin_germany
Thanks a lot Srikanthus2002. I did as you...
Thanks a lot Srikanthus2002. I did as you mentioned and it's working fine when I try to FTP files in a directory "ftp`date '+%Y%m%d'`" on local server. But, when I try to ftp the same files to one...
5,990
Posted By berlin_germany
Help in FTP'ing multiple files
Hi,
I have written the following FTP script to get the multiple files from remote server to local server. My problem is that 'mget *' is not working in the script. I also tried with 'mget *.txt',...
24,884
Posted By berlin_germany
How to list today's files
Hi,

I am trying to list names of only today's files OR say, files which are not older than 1 hour and copy them in 'list.txt' file. I know,
:ls > list.txt will list all the files. But, how to...
1,842
Posted By berlin_germany
FTP'ing files with filenames in mail messege
Hi,
I have created the following FTP script, which transfers daily “.txt” files from remote server in to a timestamped folder on local server. Once all files are FTP'ed, it then deletes files from...
Showing results 1 to 17 of 17

 
All times are GMT -4. The time now is 10:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy