Textfile lesson


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Textfile lesson
# 1  
Old 03-11-2010
Textfile lesson

Tag allerseits

Ich habe ein umfangreiches Script. Darin möchte ich zu Beginn ein textfile lesen. Den ersten Satz.

Dann kommen mehrere Instruktionen und dann soll wieder gelesen werden. Den zweiten Satz.

Etc.

Ich kann also das herkömmliche while read xyz / do ... done nicht benützen.

Gibt es da eine Lösung?

Gruss
HP
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Web Development

Oracle Jet - LP: 10. Lesson 1: Oracle JET 4.x - Lesson 1 - Part 4: Data Binding

Working on LP: 10. Lesson 1: Oracle JET 4.x - Lesson 1 - Part 4: Data Binding in this Oracle JET online course - Soar higher with Oracle JavaScript Extension Toolkit (JET), I have created this code for incidents.js I cannot get the load average data in this Oracle JET test to update the... (4 Replies)
Discussion started by: Neo
4 Replies

2. Shell Programming and Scripting

Variablecontent in a Textfile

I want to save a variablecontent in a Textfile. How can i do that? These works only with ls shell_exec("ls > text.txt");Please use code tags, thanks (2 Replies)
Discussion started by: Linuxmann
2 Replies

3. Shell Programming and Scripting

How to separate sorte different characters from one textfile and copy them in a new textfile?

My first post, so don't kill me :) Say i open some textfile with some example like this. on the table are handy, bread and wine Now i know exactly what is in and i want to separate and sorted it in terminal to an existing file with another 2 existing lines in like this: table plane ... (3 Replies)
Discussion started by: schwatter
3 Replies

4. Windows & DOS: Issues & Discussions

Use Textfile for variables ?

So... I have a text file that contains this (hex.txt): #8C7CA6 #6C70A5 #75777C #959A90 #7A7C6C #867DAB #80867E #8A87BD #6B71C6 #8F8A79 #9A9DCE #7E87D0 #69709E #82968C #7C8F81 #A3917B (5 Replies)
Discussion started by: pasc
5 Replies

5. AIX

Securing AIX - Hardening Lesson 101

Every now and then I google: SecuringAIX (I write a blog by that name, so I am curious where it stands - and to my dismay I did not make the top5 today from my current location. However, this unix.com/aix thread did make the top5- and, imho, it is lacking in clarity and ease. So, I thought I... (3 Replies)
Discussion started by: MichaelFelt
3 Replies

6. Shell Programming and Scripting

Change value in a textFile

Hi everyone, I need to make a script to take three parameters: -> KEY -> NEW_VALUE -> FILE The FILE is a text plane file. The KEY is a variable to configure, for example: KEY1 = HOLA KEY2= HOLA KEY3=HELLO KEY4 =HOLA And the... (4 Replies)
Discussion started by: Xedrox
4 Replies

7. Shell Programming and Scripting

Rename multiple files lesson

Hi All, So I found a cool way to change extensions to multiple files with: for i in *.doc do mv $i ${i%.doc}.txt done However, what I want to do is move *.txt to *_0hr.txt but the following doesn't work: for i in *.txt do mv $i ${i%.txt}_0hr.txt done My questions are (1) Why... (2 Replies)
Discussion started by: ScKaSx
2 Replies

8. UNIX for Advanced & Expert Users

Lesson Learned: Dual boot XP and Fedora 9

This post captures my recent experience in getting my Dell XPS Gen 3 to support dual boot of Windows XP (Professional) and the Fedora 9 Linux distribution. I searched quite a bit on the internet and found, of course, a variety of opinions regarding how to setup this type (dual boot) of... (1 Reply)
Discussion started by: rlandon@usa.net
1 Replies
Login or Register to Ask a Question
learn(1)						      General Commands Manual							  learn(1)

NAME
learn - Provides computer-aided instruction for the C shell SYNOPSIS
learn [-directory] [subject] [lesson] The learn command provides computer-aided instruction courses and practice in the use of Tru64 UNIX. OPTIONS
Allows you to exercise a script in a nonstandard place. DESCRIPTION
To get started, enter learn; if this is the first time that you are invoking the learn command, you are guided through a series of ques- tions to determine what type of instruction you want to receive. If you have used learn before and left your last session without completing a subject, the program uses information in $HOME/.learnrc to start you up in the same place you left off. To bypass questions, enter a subject or lesson. In order to enter a lesson, you must know the lesson number that you received in a previ- ous learn command session. If you do not know the lesson number, enter the lesson number as a subject. The learn command searches for the first lesson containing the subject you specified. If the lesson is a - (dash), learn prompts for each lesson; this is useful for debug- ging. You can specify the following subjects: files editor vi morefiles macros eqn C SUBCOMMANDS
There are a few special commands. The bye command terminates a learn session, and the where command tells you of your progress (where m tells you more.) The again command redisplays the text of the lesson and again lesson lets you review lesson. The hint command prints the last part of the lesson script used to evaluate a response, while hint m prints the entire lesson script. This is useful for debugging lessons and might possibly give you an idea about what is expected. EXAMPLES
To take the online lesson about files, enter: learn files You are then prompted for further input. FILES
Playpen directories. Start-up information. SEE ALSO
Commands: csh(1), ex(1) learn(1)