![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Enterprise Unix Roundup: The Ghost of Unix Future - Server Watch | iBot | UNIX and Linux RSS News | 0 | 12-19-2007 12:20 PM |
| Running UNIX commands remotely in Windows box from Unix box – avoid entering password | D.kalpana | UNIX for Dummies Questions & Answers | 1 | 04-20-2007 06:24 AM |
| FTP script for sending a file from one unix directory to another unix server director | raja_1234 | Shell Programming and Scripting | 1 | 11-30-2006 07:57 AM |
| Unix Sco Open Server, Windows Computers Problem Access Unix Shared Files Help!!!!! | haggo | Filesystems, Disks and Memory | 2 | 08-23-2006 12:39 PM |
| Unix History Question: Why are filenames/dirnames case sentsitive in Unix? | deckard | UNIX for Dummies Questions & Answers | 3 | 03-26-2005 01:59 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Need help with Unix assignmet
Hi i am a newbie to UNIX and i am undertaking a course, i have some exercises and one of them is as follows:
Create a file with x amount of lines in it, the content of your choice. Write a script named 'firstline' that takes two arguments. The first being a line of text, the second being your newly created file. The script should take the first argument and insert it into the very top (the first line) of the file named in your second argument. Assume the file is called “textfile1” and has the contents Text one Text two Text three . . . . Text n How do i redirect a variable that hold text (or a string of characters) to the 1st line of the file, without effect the current 1st line. The variable doesn’t need any input from the user, so it assume it will be as follows: Mytext=”hello people” this being the 1st argument $1 Not I am NOT permitted to use either SED or AWK. i am not looking for the full answer please, just a hint on how to start this, i am trying to learn after all ![]() Any help will be greatly appreciated. Last edited by barbus; 09-30-2007 at 12:13 PM.. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|