For removing the first 4 rows you can use the sed command as follows
For removing the first field which contains the numbers (0-28) you can use the sed command as follows
Quote:
3. Paste each row to the end of the previous row, so one file comes out as one super long line
I think you want to join all the lines
Heres a sed solution for this
Quote:
4. Comma-delimit all numbers
Here why I am using tr -s means it contains repeated space characters. I am squeezing the repeated characters
into single space and I am converting the space to comma character.
Last edited by thillai_selvan; 03-13-2010 at 05:07 AM..
How would I delete white spaces in a specified file?
Also, I'd like to know what command I would use to take something off a regular expression, and put it onto another.
ie.
.
.
.
expression1 <take_off>
.
.
.
expression2 (put here)
.
.
.
Any help would be great, thanks! (10 Replies)
hi all...
i have the next question:
i have a flat file with a lot of records (lines). Each record has 10 fields, which are separated by pipe (|). My problem is what sometimes, in the first record, there are white spaces (no values, nothing) in the beginning of the record, like this:
ws ws... (2 Replies)
I have a variable that calls in a string from txt file. Problem is the string comes with an abundance of white spaces trailing it. Is there any easy way to trim the tailing white spaces off at the end? Thanks in advance. (9 Replies)
Hi,
Can anybody suggest me how to combine two strings with two or more white spaces and assign it to a variable?
E.g.
first=HAI
second=HELLO
third="$first $second" # appending strings with more than one white spaces
echo $third
this would print
HAI HELLO
Output appears... (2 Replies)
I have a file which contains numbers as follows:
1234 9876 6789 5677 3452
9087 4562 1367 2678 7891
I need to remove the empty spaces and add commas between the numbers like:
1234,9876,6789,5677,3452,
9087,4562,1367,2678,7891
Can anyone tell me the command to do... (4 Replies)
hello all,
i have a comma delimited file.
i want to replace the commas in the file with the tilde symbol using sed.
how can i do this?
thanks. (4 Replies)
Hey guys,
I am very much new to shell scripts. So you ppl may feel that i am asking stupid question here. :D
1. I am using command line argument as an input variable. The user gets this value in his mail from client which has commas n spaces (Eg. 12,34,56,789) and the scripts... (5 Replies)
Hi,
Newbie here. I have a file that consists of data that I want to convert to a csv file. For example:
Jul 20 2008 1111 / visit home / BlackBerry8830/4.2.2 Profile/MIDP-2.0 Configuration/CLOC-1.1 VendorID/105
Jul 21 2008 22222 / add friend / BlackBerry8830/4.2.2 Profile/MIDP-2.0... (3 Replies)
SHELL SCRIPT
Hi
I have a file in the following format
Mayank Sushant
Dheeraj Kunal
ARUN Samir
How can i replace the white space in between and replace them with a comma?? The resultant output should be
Mayank,Sushant
Dheeraj,Kunal
ARUN,Samir
i tried using
sed -e... (8 Replies)
Hi;
In following code
find LOG_DIR -type f | while read filename; do echo $filename; done
I want to precede each white space encountered in filename with \ so that when i use $filename for running some commands in do...done,it wont give me an error.
will appreciate ur help in this.... (1 Reply)
Discussion started by: ajaypadvi
1 Replies
LEARN ABOUT OPENSOLARIS
gnome-text-editor
gedit(1) User Commands gedit(1)NAME
gnome-text-editor, gedit - Text Editor for the GNOME desktop.
SYNOPSIS
gnome-text-editor | gedit [--encoding=encoding] [--new-document] [--new-window] [+[num]] [gnome-std-options] [filename]
DESCRIPTION
gedit or gnome-text-editor is the official text editor of the GNOME desktop environment.
While aiming at simplicity and ease of use, gedit is a powerful general purpose text editor. It can be used to create and edit all kinds of
text files. Multiple documents can be edited at the same time. Each document resides in a specific tabbed section of the application win-
dow.
gedit features a flexible plugin system which can be used to dynamically add new advanced features to gedit itself.
OPTIONS
The following options are supported:
--encoding=encoding Set the character encoding to be used to open the files listed on the command line.
--new-document Create a new top-level document or tabbed section in an existing instance of gedit.
--new-window Create a new top-level window in an existing instance of gedit.
+[num] For the first file, go to the line specified by num (do not insert a space between the "+" sign and the number). If
num is missing, go to the last line.
gnome-std-options Standard options available for use with most GNOME applications. See gnome-std-options(5) for more information.
OPERANDS
The following operands are supported:
filename The name of the image file to edit.
EXTENDED DESCRIPTION
The gedit application accepts pipes, so you can specify a pipe after another command, to load the output of the command into gedit. For
example:
example% ls -l | gedit
EXAMPLES
Example 1: To Edit an ASCII File Named document.txt
example% gedit document.txt
Example 2: To Add a New Tab That Contains an ASCII File Named book.txt
example% gedit --new-document book.txt
Example 3: To Add a New Top-Level Window That Contains an ASCII File Named testfile.txt
example% gedit --new-window testfile.txt
EXIT STATUS
The following exit values are returned:
0 Application exited successfully.
>0 An error occurred.
FILES
The following files are used by this application:
/usr/bin/gedit The executable file for the gnome-text-editor application.
/usr/bin/gnome-text-editor A symbolic link to the gedit executable file.
/usr/lib/gedit/plugins Location of gedit plugins.
/usr/share/gtk-doc/html/gedit Location of developer documentation for writing a gedit plugin.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWgnome-text-editor |
+-----------------------------+-----------------------------+
|Interface stability |Volatile |
+-----------------------------+-----------------------------+
SEE ALSO libgtksourceview-1.0(3), attributes(5), gnome-std-options(5)
Online Help gedit manual.
NOTES
This man page was written by the following people: Paolo Maggi, Paolo Borelli, Chema Celorio, James Willcox, Federico Mena Quintero.
Updated by Brian Cameron, Sun Microsystems Inc., 2003, 2004, 2006.
SunOS 5.11 31 Aug 2004 gedit(1)