Sponsored Content
Top Forums Shell Programming and Scripting problem with output re director to a file Post 302648829 by dsravan on Wednesday 30th of May 2012 12:01:29 PM
Old 05-30-2012
problem with output re director to a file

I have a file named XXX_TEF_20120530234576.txt.pgp

I am creating a new file with the below syntax but looks it doesnt like the redirection

Code:
for file in XXX_TEF_20120530234576.txt.pgp ;do;
echo $file
cat $file | /usr/bin/gpg/ -d > echo $file | cut -f1,2 -d'.'
done;

What I want actually is the o.p written to a txt file derived from the file name

basically something like thid

Code:
for file in XXX_TEF_20120530234576.txt.pgp ;do;
echo $file
cat $file | /usr/bin/gpg/ -d > XXX_TEF_20120530234576.txt
done;

can somebody tell me what's wrong with my script?

Last edited by Scrutinizer; 05-31-2012 at 12:42 AM.. Reason: code tags
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

FTP script for sending a file from one unix directory to another unix server director

Hi, My local server is :/usr/abcd/ Remote server is :/Usr/host/test/ I want to send files from local unix directory(All files starting with O_999) to remote host unix directory. Can any body give me the Unix Shell script to do this. One more doubt: Shall we need to change the file... (1 Reply)
Discussion started by: raja_1234
1 Replies

2. Shell Programming and Scripting

problem parsing output file

Hi Gurus, I am using the following code to parse the output of a file. This code basically parses the file and adds | at the end of each field. But I am getting it wrong in some cases. I have explained it below #----- parse output file, get each field position, ----- #----- and construct... (13 Replies)
Discussion started by: ragha81
13 Replies

3. Shell Programming and Scripting

problem with suppressed output to file using echo and tee command

Hi, When I run the following command in terminal it works. The string TEST is appended to a file silently. echo TEST | tee -a file.txt &>/dev/null However, when I paste this same line to a file, say shell1.sh, and use bourne shell . I run this file in terminal, ./shell1.sh. However I... (1 Reply)
Discussion started by: shahanali
1 Replies

4. Shell Programming and Scripting

problem with print append to output file syntax

I'm trying to output the contents of the infile to the outfile using Append. I will want to use append but the syntax doesn't seem to be working ! Input file (called a.txt) contains this: a a a b b b I'm running shell script (called k.sh) from Unix command-line like this: ./k.sh .... (1 Reply)
Discussion started by: script_op2a
1 Replies

5. AIX

IBM System Director

Is IBM System Director good for collecting error and notifications from IBM servers such as x3250 x336 etc... or Please give me brief description for the purpose of IBM system Director Thanks in advance (1 Reply)
Discussion started by: Vit0_Corleone
1 Replies

6. AIX

IBM Systems Director

dears is IBM Systems Director free to downlad and install or i must pay to have this application? (2 Replies)
Discussion started by: thecobra151
2 Replies

7. AIX

Help on System Director

Hi all, the DIRDB on DB2 used by system director was dropped. It's possible to reinstall only the container DIRDB, instead of reinstall all system director software? P.S. If i use "smreset" i have an error: DB21005E An error occurred while accessing the file "db2/temp-connect.sql" I find... (1 Reply)
Discussion started by: Zio Bill
1 Replies

8. Shell Programming and Scripting

Problem with output file plink GWAS

hi, Can anybody help me about the odd output file yielded by the following command: plink --noweb --allow-no-sex --bfile input_file --assoc --adjust --out output_file In fact, I'd like to perform a simple Bonferroni basic association test, and I obtains the following output file (extract... (1 Reply)
Discussion started by: boro82
1 Replies
All times are GMT -4. The time now is 03:55 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy