Results 1 to 5 of 5
Hi!
I am having a problem getting a shell script to always successfully run. The script simply concatenates text files together that have similar prefixes, and outputs them to another ...
- 04-02-2008 #1Just Joined!
- Join Date
- Feb 2008
- Posts
- 15
Basic shell script not working
Hi!
I am having a problem getting a shell script to always successfully run. The script simply concatenates text files together that have similar prefixes, and outputs them to another file.
It works in many instances, but it seems to break if there are 7 or more instances of files with one of the prefixes in the directory it runs in. In the example below, if there were 7 or more files that started with 'INTFR', for example, the script may not work. The problem may also lie with the size of the files - I am not sure.
Here is what it looks like:
Does 'cat' not work under certain conditions? Is there some way to figure out why it is failing?Code:cat /WORK/AREA/INTCCENT* > /WORK/AREA/INTCCENT1 cat /WORK/AREA/INTDLY* > /WORK/AREA/INTDLY1 cat /WORK/AREA/INTFR* > /WORK/AREA/INTFR1 cat /WORK/AREA/INTJF* > /WORK/AREA/INTJF1 cat /WORK/AREA/INTSAL* > /WORK/AREA/INTSAL rm /WORK/AREA/*.0*.S
Thanks!
CharlieLast edited by devils casper; 04-02-2008 at 01:39 PM. Reason: Added [code]...[/code] tag.
- 04-02-2008 #2Just Joined!
- Join Date
- Mar 2008
- Posts
- 26
there's no reason I can see. maybe thry cating to a different directory. Maybe what's happening is the file is then created, and it's trying to cat the new file to itself?
- 04-02-2008 #3Linux Newbie
- Join Date
- Nov 2007
- Location
- Planet Earth
- Posts
- 152
I'm not sure, but maybe if you try:
cat /WORK/AREA/INTCCENT* > /WORK/AREA/_INTCCENT1
to avoid the concatenation of result file ...EOF
- 05-06-2011 #4Just Joined!
- Join Date
- May 2011
- Posts
- 1
I am having this same issue. Did you get it figured out?
- 05-06-2011 #5forum.guy
- Join Date
- May 2004
- Location
- arch linux
- Posts
- 18,096
oz
→ new members/users: read this first | new member faq
→ no private messages requesting computer support - post them on the forums!
→ please use the "report post" button to alert our forum admins to problematic posts rather than responding to them yourself.



