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, 05: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, 05:39 PM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
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, 07:23 PM   #3
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: Slackware®
Posts: 12,899
Blog Entries: 27

Rep: Reputation: 2186Reputation: 2186Reputation: 2186Reputation: 2186Reputation: 2186Reputation: 2186Reputation: 2186Reputation: 2186Reputation: 2186Reputation: 2186Reputation: 2186
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, 07:33 PM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 19,322

Rep: Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470
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, 08:51 AM   #5
cola
Senior Member
 
Registered: Sep 2007
Location: Dhaka,Bangladesh
Distribution: Debian
Posts: 1,031

Rep: Reputation: 63
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 05:28 AM
perl: simple one line replacement, simple error message! pwd_pwd_omg_pwd Programming 8 11-19-2008 01:53 PM
Simple SH Error - I hope... Micah Programming 5 06-28-2005 11:41 PM
Error for a very simple C program pkashyap Linux - Newbie 2 03-11-2004 11:24 AM
A simple error?? absolute0net Linux - Networking 3 07-08-2003 03:06 PM

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

All times are GMT -5. The time now is 09:04 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration