Script to move the first line of a file to the end
I'm rather new to scripting, and despite my attempts at finding/writing a script to do what I need, I have not yet been successful.
I have a file named "list.txt" of arbitrary length with contents in the following format:
I would like a script that will change the contents of "list.txt" to:
Basically, I need the first line moved to the end. I don't care whether it's in bash, awk, sed, perl, or whatever scripting language as long as it works.
Hi All,
I have written a korn script (code pasted below). It is giving the error while debugging "new.sh: syntax error at line 62: `end of file' unexpected".
I have re-written the whole code in VI and explored all help related to this error on this Unix forum and tried it. Somehow, I could... (7 Replies)
My input file is multiline file and I am writing a script to search for a pattern and move the line with the pattern and the next line to the end of the file. Since I am trying to learn awk, I thought I would try it.
My input looks like the following:
D #testpoint 1
510.0
D #testpoint2 ... (5 Replies)
Can somebody help me with a script ....
Read a file /etc/inittab
find the string starting with rcml and move it entirely towards the end of file.
rcml:2:once:/usr/sni/aix52/rc.ml > /dev/console 2>&1
I basically want to change the startup sequence. (2 Replies)
I have the following text format in a file which lists the question first and then 5 choices
after that the explanantion and finally the answer.
1.The amount of time it takes for most of a worker’s occupational knowledge and skills to become
obsolete has been declining because of the... (2 Replies)
Hi Folks,
I was given a task to append three IP's at the end of a specific (and unique) line within a file on multiple servers.
I was not able to do that with the help of a script. All I could was:
for i in server1 server2 server3 server4
do
ssh $i
done
I know 'sed' could be used to... (5 Replies)
Hey guys,
I want move a specific word from the middle of the text and move it the end of the file, which means I want the word to be deleted from it's line and moved to the end of file.
I know how to use sed for adding a word the end of file, but I don't know how to move words.
tnx (2 Replies)
Hello,
I'm new to this forum. I've been doing a lot of sed work lately and have found many useful tips on this forum. I've hit a roadblock in a project, though, and could really use some help.
I have a text file with many lines like the following, i.e., some lines begin with a single word... (3 Replies)
first of all I thought the argument DONE is necessary for all scripts that have or begin with do statements which I have on my script, However, I still don't completely understand why I am receiving an error I tried adding another done argument statement but didn't do any good.
I appreciate... (3 Replies)
Hello,
I'm works on Ubuntu server
My goal : I would like to read file line per line, but i want to started at the end of file.
Currently, I use instructions :
while read line;
do
COMMAND
done < /var/log/apache2/access.log
But, the first line, i don't want this. The file is long... (5 Replies)
My file (the output of an experiment) starts off looking like this,
_____________________________________________________________
Subjects incorporated to date: 001
Data file started on machine PKSHS260-05CP
**********************************************************************
Subject 1,... (9 Replies)
Discussion started by: samonl
9 Replies
LEARN ABOUT DEBIAN
fmit
fmit(1) General Commands Manual fmit(1)NAME
fmit - Free Music Instrument Tuner
SYNOPSIS
fmit
There are no command line options.
DESCRIPTION
The Free Music Instrument Tuner (fmit) is a graphical sofware for tuning your music instrument using QT as gui library.
For the sound input library you can choise to use ALSA or JACK.
fmit contain all features of a standard hardware instrument tuner.
You choise the tuning frequency corresponding at your tuning note, and when you play it, fmit display your error margin.
Other views are availables, corresponding to more advanced and specific features like a microtonal tuning with more precision about you
error margin, and a view of the harmonics ratio.
Currently 6 views are availables:
1 A small view of the captured sound.
2 An history of the pitch error.
3 An history of the sound volume.
4 The shape of the wave-length.
5 Harmonics ratio (the formants).
6 A microtonal tuning view.
BUGS
Please send bug reports or any other feedback to the fmit mailing-lists:
<fmit-user@gna.org> : For bug reports and other problems.
<fmit-cvs@gna.org> : For CVS commits.
Or contact Gilles DEGOTTEX <gilles.degottex@net2000.ch>.
AUTHOR
fmit is written and maintained by Gilles DEGOTTEX <gilles.degottex@net2000.ch>.
HOME PAGE
fmit can be found at:
<http://home.gna.org/fmit/>
COPYRIGHT
Copyright (C) 2004-2006 Gilles DEGOTTEX <gilles.degottex@net2000.ch>
Licensed under the GNU Public License V2.
This manual page was written by Ludovic RESLINGER <lr@cuivres.net>, for the Debian project (but may be used by others).
August 13, 2006 fmit(1)