![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to delete content in a file (delete content only) | kittusri9 | Shell Programming and Scripting | 5 | 05-15-2008 10:12 AM |
| file moving based on file content | melvyn.cochrane | Shell Programming and Scripting | 12 | 02-15-2008 02:10 AM |
| extract content from a file and insert to another file | fredao | Shell Programming and Scripting | 15 | 12-06-2006 03:36 PM |
| transfer of specific file content to another file | mem101 | Shell Programming and Scripting | 1 | 10-18-2005 11:01 AM |
| To delete content of many file | athresh | UNIX for Dummies Questions & Answers | 4 | 12-10-2001 12:34 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
Using the content of a file in the name of another
Hey there,
I have this issue: I have to use the contents of a file generated by the function: #!/usr/bin/ksh date '+%m %d %Y' | { read MONTH DAY YEAR CEROD=0 DAY=`expr "$DAY" - 10` case "$DAY" in 0) MONTH=`expr "$MONTH" - 1` CEROD= CEROM=0 case "$MONTH" in 0) MONTH=12 YEAR=`expr "$YEAR" - 1` ;; esac DAY=`cal $MONTH $YEAR | grep . | fmt -1 | tail -1` esac case "$DAY" in -1) MONTH=`expr "$MONTH" - 1` CEROD= CEROM=0 case $MONTH in 1|3|5|7|8|10|12) DAY=30;; 2) DAY=27;; 4|6|9|11) DAY=29;; esac esac . . . . case "$DAY" in -6) MONTH=`expr "$MONTH" - 1` CEROD= CEROM=0 case $MONTH in 1|3|5|7|8|10|12) DAY=25;; 2) DAY=22;; 4|6|9|11) DAY=24;; esac esac echo "$YEAR$CEROM$MONTH$CEROD$DAY" > fecha1.txt } And use it as a parameter of the name of a file Iīm transfering with this shell script : /dconnect/cdunix/ndm/bin/cdpmgr -i /dconnect/cdunix/ndm/cfg/AFOIXE.UNIX/initparm .cfg set -v NDMAPICFG=/dconnect/cdunix/ndm/cfg/cliapi/ndmapi.cfg FECHA=`date +%Y%m%d` export NDMAPICFG FECHA /dconnect/cdunix/ndm/bin/ndmcli -x << EOJ submit env_1104_1 process snode=INSCONS.UNIX startt=(`date +%D`,06:10 am) step1 copy from (file=/dconnect/envios/20050808_AF_560_000.1104) ckpt = 200k compress = extended to (file=/export/home/rec/CONTA/RECEPCION/$A_AF_560_000.1104 disp=rpl) pend; . . . . . submit env_1104_5 process snode=INSCONS.UNIX startt=(`date +%D`,06:18 am) step1 copy from (file=/dconnect/envios/20050814_AF_560_000.1104) ckpt = 200k compress = extended to (file=/export/home/rec/CONTA/RECEPCION/20050814_AF_560_000.1104 disp=rpl) pend; EOJ So long I havenīt figured out how to, so anyone could please help? Thanks a lot! |
| Forum Sponsor | ||
|
|