06-20-2011
Shell Scripting
First of all I would like to tell you that I am totally new to UNIX so kindly explain me in detail if possible.
I have a file, which has multiple rows. I want to read the file till I reach the end of 1st row and append a text in that row.
Then I want to read 2nd line and do the same [Append the same text] to the 2nd line's end.
and so on till I reach the end of the file.
The text which I want to append has been inputted by the user.
Kindly help me.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
please give the difference between AIX shell scripting and Unix shell scripting. (2 Replies)
Discussion started by: haroonec
2 Replies
2. Shell Programming and Scripting
Hi
How to call a shell scripting through a Perl scripting? Actually I need some value from Shell scripting and passes in the Perl scripting. So how can i do this? (2 Replies)
Discussion started by: anupdas
2 Replies
3. What is on Your Mind?
Hi all,
I would like to start developping some good scripting skills. Do you think it would be best to start with shell scripting or Perl? I already got a fundation, really basics, in perl. but I am wondering what would be best to be good at first.
Can you please help me determine which one to... (14 Replies)
Discussion started by: Pouchie1
14 Replies
4. Android
I just upgraded to Android 2.2 from 2.1. The GPS issue that was troublesome in 2.1 seems to have been fixed. Some of web browsing seems faster, but it could just be my connection is better today ;) Flash works in some browsers but not very good and it is too slow for Flash apps designed for... (0 Replies)
Discussion started by: Neo
0 Replies
5. What is on Your Mind?
Gents,
I have been working in a Solaris/Unix environment for about 9 months. I took some linux classses online before getting the job. But, I am not very good at scripting. I want to learn how to script. Do you think that I should start with Shell scripting or Perl? I wanted to continue with... (2 Replies)
Discussion started by: Pouchie1
2 Replies
6. Web Development
i am going to study any one of the scripting languages mentioned above(shell 0r perl scripting) . Which is having more scope for a fresher? (1 Reply)
Discussion started by: Anna Hussie
1 Replies
7. UNIX for Dummies Questions & Answers
Hey I have a data in the file named as outputFile.txt. The data is in the format
123456,12345678912345,400,09/09/09,INACTIVE.
I want this output without commas ie
12345612345678912345400090909INACTIVE.
Please tell me what to do and clear explain all the terms, as I am new to it. (6 Replies)
Discussion started by: sampandey31
6 Replies
8. Shell Programming and Scripting
Hi, if in a network there are lots of PCs connected with either windows or linux as operating system.Then what will be the shell script for the same and also if the PC has linux in it then we have to find if it is occupied or unoccupied.
If the PC has windows in it then we have to find if it is... (6 Replies)
Discussion started by: akansha singh
6 Replies
9. Shell Programming and Scripting
Hi there
please have a look at the code..i want to create Using a named pipe. Run a find in the background starting in the working directory
While this is happening wait for input from the user to ask him which file to find.
If the user does not enter any data in 10 seconds ask the user again.... (1 Reply)
Discussion started by: kattak1511
1 Replies
10. UNIX for Dummies Questions & Answers
sxsaaas (3 Replies)
Discussion started by: VikrantD
3 Replies
LEARN ABOUT DEBIAN
grd2xyz
GRD2XYZ(l) GRD2XYZ(l)
NAME
grd2xyz - Converting a grdfile to an ASCII or binary table
SYNOPSIS
grd2xyz grdfile [ -H[nrec] ] [ -L ] [ -Rwest/east/south/north[r] [ -S[r ] [ -V ] [ -Z[flags] ] [ -bo[s][n] ]
DESCRIPTION
grd2xyz reads a binary 2-D grdfile and writes out xyz-triplets in ASCII [or binary] format to standard output. Modify the precision of the
ASCII output format by editing the D_FORMAT parameter in your .gmtdefaults file, or choose binary output using single or double precision
storage. As an option you may output z-values without the (x,y) in a number of formats, see -Z below.
grdfile
The 2-D binary file to be converted.
OPTIONS
-H Output 1 header record based on information in the grdfile header. Ignored if binary output is selected. [Default is no header].
-L Indicates that the x values are longitudes (necessary for -: to work).
-R west, east, south, and north specify the Region of interest. To specify boundaries in degrees and minutes [and seconds], use the
dd:mm[:ss] format. Append r if lower left and upper right map coordinates are given instead of wesn.
-S Suppress output for nodes whose z-value equals NaN [Default outputs all nodes]. Append r to reverse the suppression, i.e., only
output the nodes whose z-value equals NaN.
-V Selects verbose mode, which will send progress reports to stderr [Default runs "silently"].
-Z Write a 1-column ASCII [or binary] table. Output will be organized according to the specified ordering convention contained in
flags. If data should be written by rows, make flags start with T(op) if first row is y = ymax or B(ottom) if first row is y =
ymin. Then, append L or R to indicate that first element should start at left or right end of row. Likewise for column formats:
start with L or R to position first column, and then append T or B to position first element in a row. For gridline registered
grids: If grid is periodic in x but the outcoming data should not contain the (redundant) column at x = xmax, append x. For grid
periodic in y, skip writing the redundant row at y = ymax by appending y. If the byte-order needs to be swapped, append w. Select
one of several data types (all binary except a):
a ASCII representation
c signed 1-byte character
u unsigned 1-byte character
h short 2-byte integer
i 4-byte integer
l long (4- or 8-byte) integer
f 4-byte floating point single precision
d 8-byte floating point double precision
Default format is scanline orientation of ASCII numbers: -ZTLa. Note that -Z only applies to 1-column output.
-bo Selects binary output. Append s for single precision [Default is double]. This option only applies to xyz output; see -Z for z ta-
ble output.
EXAMPLES
To edit individual values in the 5' by 5' hawaii_grv.grd file, try
grd2xyz hawaii_grv.grd > hawaii_grv.xyz
To write a single precision binary file without the x,y positions from the file raw_data.grd file, using scanline orientation, try
grd2xyz raw_data.grd -ZTLf > hawaii_grv.b
SEE ALSO
gmtdefaults(1gmt), gmt(1gmt), grdedit(1gmt), xyz2grd(1gmt)
1 Jan 2004 GRD2XYZ(l)