11-07-2011
need help with cut and paste command
I have a file which contains 3 fields separated by tabs example
andrew kid baker
I need to swap kid and baker using cut and paste commands how is this to be done?
Thanks
Last edited by Scott; 11-07-2011 at 03:08 AM..
Reason: Homework. Closed.
10 More Discussions You Might Find Interesting
1. UNIX Desktop Questions & Answers
One of the things that I have learned to take for granted in the Win32 world is the cut, copy and paste hotkeys of ^X, ^C and ^V.
I use these keys all the time under Win32 to copy and paste information from one GUI into another GUI.
My question is, does X have a similiar standard?
... (4 Replies)
Discussion started by: auswipe
4 Replies
2. Shell Programming and Scripting
hi i am new to shell scripting,
i have been trying to cut columns numbered 1,4 of a file consisiting of 4 columns. Each column is seperated by 2 spaces.
for example:
john 6102097199 tennessee usa
michel 6734590899 texas USA
now, i need to cut the name... (3 Replies)
Discussion started by: t_harsha18
3 Replies
3. Shell Programming and Scripting
Hello
I have a very large file where say each line is made up of 80 characters.
I want to cut the characters from 20-30 and 50-60 from each line and then insert a delimiter between them (# or | etc).
eg
input file
000000000131.12.20990000590425246363375670011200140406... (5 Replies)
Discussion started by: PradeepRed
5 Replies
4. UNIX for Dummies Questions & Answers
Hi all!
How do I cut, copy and paste under unix??? (2 Replies)
Discussion started by: aitor314
2 Replies
5. Shell Programming and Scripting
Hi i need a favour
i have a file which has some trillions of records. The file is like this
11111000000000192831840914000000000000000000000000000
45789899090000000000000000011111111111111111111111111
I want to cut specific postions in each line like cut1-3 and assisgn it to a variable and... (5 Replies)
Discussion started by: richa2.m
5 Replies
6. Shell Programming and Scripting
hi,
I have a file with content like this for an employee:
EmployeeID
101
Day_type, day
vacation,1/2/2009
sick day, 3/2/2009
personal day, 4/5/2009
jury duty day, 5/5/2009
how do I make the result to show:
EmployeeID,Day_type,day
101,vacation,1/2/2009
101,sick day,... (6 Replies)
Discussion started by: jbchen
6 Replies
7. Shell Programming and Scripting
Hi,
Need a help with shell script. I have to search for a string in one of the file, if match found, copy the line to a new file and delete the line from the exisiting file.
eg:
83510000000000063800000.1800000.1600000.1600000.2400000.1800000.2000000.21... (6 Replies)
Discussion started by: gpaulose
6 Replies
8. UNIX for Dummies Questions & Answers
I have a file which contains 3 fields separated by tabs example
andrew kid baker
I need to swap kid and baker using cut and paste commands how is this to be done?
Thanks (1 Reply)
Discussion started by: drew211
1 Replies
9. Shell Programming and Scripting
Hi,
I have a file like this -->
Consider z as space
#cat filename
ABC
<!--Nzzzzz-->
<!--RESUMO-->
EFG
XYZ
<!--Nzzzzz-->
<!--RESUMO-->
I need to cut the <!--RESUMO--> part and paste it to the previous line so that the file will look like this-->
ABC
<!--Nzzzzz--><!--RESUMO-->... (4 Replies)
Discussion started by: samsonata
4 Replies
10. Shell Programming and Scripting
Hello,
I have some problem in cut or paste command for my text data.
Input1.txt :
I use cut command :
cut -d ' ' -f1 Input1.txt > result.txt result.txt :
Then, I use paste command to merge result.txt.
paste -d ' ' result.txt Input1.txt > output.txt output.txt showed :
I use cut... (1 Reply)
Discussion started by: awil
1 Replies
LEARN ABOUT DEBIAN
planets
planets(1) General Commands Manual planets(1)
NAME
planets - Gravitational simulation of planetary bodies
DESCRIPTION
Planets is a simple interactive program for playing with simulations of planetary systems. It is great teaching tool for understanding how
gravitation works on a planetary level.
The user interface is aimed at being simple enough for a fairly young kid can get some joy of it. There's also a special kid-mode aimed at
very young children which grabs the focus and converts key banging into lots of random planets.
KEYBINDINGS
Universe definition
a Add Planet
j Place random orbital planet
r Place random planet
u Undo (undoes last planet insertion)
e Reset to empty universe
g Go Back (goes back to just after last planet insertion)
Mouse Click on a planet to delete it
Physics
b Toggle bounce (experimental)
Display control
Cursor keys
Panning
c, Space
Move display to center of mass
x Initiate center of mass tracking
= Zoom in
- Zoom out
p Toggle Pause
o Change all colors randomly
t Toggle Trace
d Double Trace Length
h Halve Trace Length
Mouse Drag a box around a set of planets to follow the center of mass of those planets
Program control
H Display help dialog
k Display option dialog
Ctrl-Shift-k
Toggle kid-mode. Kid mode locks the keyboard and mouse, so the only way to get out is to toggle kid-mode again to get out.
l Load Universe After pressing l, press any other character to load the universe with that name. Universes are stored in ~/.planets/ .
s Save Universe After pressing s, press any other character to save the universe with that name. Universes are saved in ~/.planets/ .
q, Esc Quit
TECHNICAL DETAILS
Planets uses a fourth-order runge-kutta approximation for the simulation itself. Planet bouncing is achieved by adding a repulsive force
to planets at close quarters. Planets is fairly flexible: you can change the gravitational constant, the time-slice of the simulation, and
even the exponent used in the gravitational law. Universes are saved in the ~/.planets directory, and are simple human readable and
editable files.
BUGS
Currently bouncing doesn't work very well unless you make the time-slice quite small. Ideally, it would be nice to have a billiard-style
bounce system, but it's not clear how to do this accurately in the presence of a strong gravitational field.
AUTHOR
Planets was written by Yaron M. Minsky <yminsky@cs.cornell.edu> as a gift for his nephew, Eyal Minsky-Fenick.
This manpage was contributed originally by Martin Pitt <martin@piware.de> for the Debian GNU/Linux system (but may be used by others).
April 20, 2003 planets(1)