The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Create individual tgz files from a set of files amitg UNIX for Dummies Questions & Answers 4 04-29-2008 10:13 AM
compare files and create new with awk tonet Shell Programming and Scripting 7 12-27-2007 10:05 AM
Create files with one command jess_t03 Shell Programming and Scripting 6 10-09-2007 03:30 PM
Create and pw protect .tar files clovell UNIX for Dummies Questions & Answers 5 06-22-2005 11:24 AM
Trying to create files from a file jordimirobruix Shell Programming and Scripting 5 11-02-2004 07:33 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 12-18-2006
fiol73 fiol73 is offline
Banned
  
 

Join Date: Oct 2006
Posts: 10
Smile on how to create files

hi guys! i want my user to create some new files in a directory:

i would like the user to choose a file name and then to create some kind of user friendly utility that makes my user write what he/she wants in the file and then save it in the chosen directory.

let's say that in my programme i write something like:

[CODE]
echo "Please, type the name of your first file: \c"
read firstfile
cat>$firstfile
[/CODE}

in this case the user will type the name of a file and the cat command will take him/her directly to writing utility so i think, not a very user friendly solution.....any other ideas? any other command other than CAT i could use?

THANX.
  #2 (permalink)  
Old 12-18-2006
fiol73 fiol73 is offline
Banned
  
 

Join Date: Oct 2006
Posts: 10
sorry still me but questions come to my mind while i'm working at the script...i am performing a series of IF tests, and lets say that after a

if.....then
fi

i want to go back where i started, so for example i've written:

echo "Now that you are in $choice, would you like to create some files? {y/n} \c"
read userchoice
if [ "$userchoice" = y ]
then
../esterno #it goes to another file i have created
else
#go back to the first question that was
# echo "Would you like to create a directory named $choice? {y/n} \c"

how can i do that without rewriting the same code? hope my questions are clear....

thank you guys!
  #3 (permalink)  
Old 12-19-2006
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,762
Is there a reason the user can't go into an editor - nano, vi, emacs - whatever?
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 06:30 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0