LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-05-2001, 02:39 AM   #1
ChimpFace9000
Member
 
Registered: Jul 2001
Location: So. Cal.
Distribution: Slackware 8.1
Posts: 55

Rep: Reputation: 15
Post Is scripting worth learning


Question 1:
Is learing to write scripts an important part of linux, or should i just try and learn to program linux only.

Question 2:
Is there some command that adds text to the end of a file?

Question 3:
How do i echo a new line. Like echoing the characters 10 and 13 for carriage return and line feed?
 
Old 07-05-2001, 03:23 AM   #2
mcleodnine
Senior Member
 
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731

Rep: Reputation: 45
Personally I feel that scripts are an integral part of sysadmin skills. Most (all?) distros use scripts to perform the startup and cron duties, so knowing what's going on will be a benefit when you want to make some changes.

Part 2 of your question. In bash shell use the '>>'.
Code:
echo "the stuff you type" >> yourfile
 
Old 07-05-2001, 03:52 AM   #3
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 47
Re: Is scripting worth learning

Quote:
Originally posted by ChimpFace9000
Question 1:
Is learing to write scripts an important part of linux, or should i just try and learn to program linux only.
Scripting is a type of programming, its just interpreted (sp?) instead of compiled, however the term 'scripting' covers a lot of different languages and shells! You could script using bash, tcsh, ksh, Perl just to mention a few... I as mcleodnine's said being able to write scripts without too much effort can be a serious part of sysadmin and can make you life a lot easier.

Quote:
Originally posted by ChimpFace9000
Question 3:
How do i echo a new line. Like echoing the characters 10 and 13 for carriage return and line feed?
I think that just using echo with no parameters will put a newline on for you (assuming your shell scripting). UNIX system only use a line feed, no carriage return like DOS does, thats why when you load a UNIX text file into Notepad it doesn't like it, and why sometimes you'll load a Windows text file into a UNIX editor and find a ^M on the end of each line, these are the carriage returns being displayed.

cheers

Jamie...
 
Old 07-05-2001, 04:02 AM   #4
beta
LQ Newbie
 
Registered: Jun 2001
Posts: 13

Rep: Reputation: 0
I think when you learn how to create scripts it will be very useful! It makes most things easyer, but learn is not the right word. Just play a bit with script-files.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Python - worth learning? vharishankar Programming 39 07-08-2005 02:38 AM
Is Visual Basic worth learning? titanium_geek Programming 20 07-07-2005 09:58 AM
Learning Linux from scratch - worth it / needed? mxk Linux - Newbie 38 06-27-2004 12:29 AM
GTK Programming Worth Learning drdroid Programming 3 04-14-2004 04:37 PM
Is it really worth learning vi at this point? Tyir Linux - General 8 02-24-2004 12:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:59 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
Open Source Consulting | Domain Registration