Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sun 23 Sep 2018, 06:37
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
Problem with cat and name file longer (Solved)
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [2 Posts]  
Author Message
arivas_2005

Joined: 25 Feb 2007
Posts: 195

PostPosted: Mon 17 Sep 2018, 16:29    Post subject:  Problem with cat and name file longer (Solved)  

greetings to all


I need to insert text from one file into another with 'cat'

gives the following error message: not directory

the files are separate folders and have long names with special symbols.

I attach a copy for the exercise.
file of folder BASE are dragged to texbox 1 (REPORTE -BASE-) and file folder 2 are dragged to in texbox 2 ("Correo principal -1- )
code

Code:
#!/bin/sh

CAPTURA=`yad --title="List archivos - drag and drog-" --geometry=500x400 \
--form --separator="©" \
--field="REPORTE -BASE-:TXT" \
--field="Correo principal -1- :TXT" \
--field="Reenvio -2-:TXT" \
--field="Respuesta -3-:TXT"`
##echo "$CAPTURA"
#echo "========================0"
#"$names" "$occupation" "Type your comments here" > /tmp/config
REPORTE=`echo "$CAPTURA" | awk -F"©" '{print $0}' |  sed 's/©\+//g'`
Correop=`echo "$CAPTURA" | awk -F"©" '{print $1}' |  sed 's/©\+//g'`
Reenvio=`echo "$CAPTURA" | awk -v FS=© '{print $2}' |  sed 's/©\+//g'`
Respuesta=`echo "$CAPTURA" | awk -v FS=© '{print $3}' |  sed 's/©\+//g'`
#REPORTE=`echo "$CAPTURA" | cut -d"©" -f1`

echo "$Correop"
echo "_____________________________"

#  lines command problem  'cat'
cat "$Correop"
cat "$Correop">> "$REPORTE"

#######################


thanks!
CAT-PROBLEM.zip
Description 
zip

 Download 
Filename  CAT-PROBLEM.zip 
Filesize  2.06 KB 
Downloaded  4 Time(s) 

Last edited by arivas_2005 on Mon 17 Sep 2018, 18:58; edited 1 time in total
Back to top
View user's profile Send private message 
arivas_2005

Joined: 25 Feb 2007
Posts: 195

PostPosted: Mon 17 Sep 2018, 18:57    Post subject:  

After several hours, I have overcome my problem Very Happy
thank you all for your support .
I already had two days of having the problem
mis excuses Laughing
code
Code:
#!/bin/sh

CAPTURA=`yad --title="List archivos - drag and drog-" --geometry=500x400 \
--form --separator="©" \
--field="REPORTE -BASE-:TXT" \
--field="Correo principal -1- :TXT" \
--field="Reenvio -2-:TXT" \
--field="Respuesta -3-:TXT"`

REPORTE=`echo "$CAPTURA" | awk 'BEGIN{FS="©"} {print $1}' | sed 's/©\+//g'| sed 's/^ *//g'  | sed 's/ *$//'`
Correop=`echo "$CAPTURA" | awk 'BEGIN{FS="©"} {print $2}' | sed 's/©\+//g' | sed 's/^ *//g' | sed 's/ *$//'`
Reenvio=`echo "$CAPTURA" | awk 'BEGIN{FS="©"} {print $3}' | sed 's/©\+//g' | sed 's/^ *//g' | sed 's/ *$//'`
Respuesta=`echo "$CAPTURA" |awk 'BEGIN{FS="©"} {print $4}' | sed 's/©\+//g' | sed 's/^ *//g' | sed 's/ *$//'`

#  lines command problem  'cat' solved with awk line form
echo "_____________________________">>"$REPORTE"
cat "$Correop" >>"$REPORTE"

#######################
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [2 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0471s ][ Queries: 12 (0.0075s) ][ GZIP on ]