LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-16-2010, 04:05 PM   #1
bhb
LQ Newbie
 
Registered: May 2010
Posts: 5

Rep: Reputation: 0
simple error ...... can u help !!!!


hiii ,,,
i need help in this code ,,,pleas can u help me

read $original_var
cat > $original_var

if [ -e`$original_var` ]
then
echo "Please enter the destination path, the press Control - D: "
fi
read $dest_var
cat > $dest_var
if [ -e`$dest_var` ]
#commands
fi
#commands


pleas i want an answer if u can help ma
 
Old 05-16-2010, 04:39 PM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,686

Rep: Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692
Might help if you say what you are trying to achieve.

In particular, there are two lines like:
Code:
cat > $original_var
Perhaps what you actually want is
Code:
echo $original_var
(this shows the value of the variable: eg a filename?)
or perhaps
Code:
cat $original_var
(this shows the contents of a file if $original_var is a filename).



Evo2.
 
Old 05-16-2010, 06:23 PM   #3
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: Slackware®
Posts: 13,862
Blog Entries: 41

Rep: Reputation: 3041Reputation: 3041Reputation: 3041Reputation: 3041Reputation: 3041Reputation: 3041Reputation: 3041Reputation: 3041Reputation: 3041Reputation: 3041Reputation: 3041
Hi,

Welcome to LQ!

You will find loads of information that will aid in learning to use 'bash' in several of the links below. Several are general but that to will help to learn;

Linux Documentation Project
Rute Tutorial & Exposition
Linux Command Guide
Bash Reference Manual
Advanced Bash-Scripting Guide
Linux Newbie Admin Guide
LinuxSelfHelp
Getting Started with Linux

The above links and others can be found at 'Slackware-Links'. More than just Slackware® links!
 
Old 05-16-2010, 06:33 PM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 25,637

Rep: Reputation: 7648Reputation: 7648Reputation: 7648Reputation: 7648Reputation: 7648Reputation: 7648Reputation: 7648Reputation: 7648Reputation: 7648Reputation: 7648Reputation: 7648
Quote:
Originally Posted by bhb View Post
hiii ,,,
i need help in this code ,,,pleas can u help me
Code:
read $original_var
cat > $original_var

if [ -e`$original_var` ]
 then
echo "Please enter the destination path, the press Control - D: "
fi
read $dest_var
cat > $dest_var
if [ -e`$dest_var` ]
#commands
fi
#commands
pleas i want an answer if u can help ma
As evo2 said, it would help if we knew what was wrong. Provide useful details, like what the script is SUPPOSED to do, what it's ACTUALLY doing, etc.

Also, SPELL OUT YOUR WORDS, and write clearly.
 
Old 05-20-2010, 07:51 AM   #5
cola
Senior Member
 
Registered: Sep 2007
Posts: 1,034

Rep: Reputation: 65
Quote:
Originally Posted by bhb View Post
hiii ,,,
i need help in this code ,,,pleas can u help me

read $original_var
cat > $original_var

if [ -e`$original_var` ]
then
echo "Please enter the destination path, the press Control - D: "
fi
read $dest_var
cat > $dest_var
if [ -e`$dest_var` ]
#commands
fi
#commands


pleas i want an answer if u can help ma
You can mark the thread as "[SOLVED]" if it's solved.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple Makefile error:: all nothing need to be done. knockout_artist Linux - Kernel 9 10-23-2009 04:28 AM
perl: simple one line replacement, simple error message! pwd_pwd_omg_pwd Programming 8 11-19-2008 12:53 PM
Simple SH Error - I hope... Micah Programming 5 06-28-2005 10:41 PM
Error for a very simple C program pkashyap Linux - Newbie 2 03-11-2004 10:24 AM
A simple error?? absolute0net Linux - Networking 3 07-08-2003 02:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration