12-22-2005
Adding a character in the beginning of every line in a .dat file
How can i add a character(#) in the beginning of every line in a .dat file
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi everyon,
I am trying to search for a pattern in a file and add "//" to the begining of the file.
lets say i want to comment out a line from my codes. the line that should be commented out contains the word "reset". i need to search for the word "reset" and comment out that specific line. is... (5 Replies)
Discussion started by: ROOZ
5 Replies
2. Shell Programming and Scripting
I used following to add * at the end of the line in file1.
It adds * at the end but has a space before it for some lines but some other lines it adds exactly after the last character.
How do I take out the space ?
sed 's/$/*/' file1 > file2
example:
contents of file1 :
... (2 Replies)
Discussion started by: pitagi
2 Replies
3. UNIX for Dummies Questions & Answers
Hi,
how could you go about removing words that begin with a certain character.
assuming that this character is '-' I currently have
echo "-hello" | sed s/-/""/
which replaces the leading dash with nothing but I want to remove the whole word, even if there are multiple words beginning... (3 Replies)
Discussion started by: skinnygav
3 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I have file a.txt as below. I want to add one string root beginning of each line.
Sample file a.txt
aaa
bbb
ccc
Sample output
Root aaa
Root bbb
Root ccc
Can any one help me on this? (6 Replies)
Discussion started by: siba.s.nayak
6 Replies
5. UNIX for Dummies Questions & Answers
about 200 files with names as
11_0.pdb
11_60.pdb
12_12.pdb
14_180.pdb
are there in my library...I need to rename all of them by addinf File in front of them as:
File11_0.pdb
File11_60.pdb
File12_12.pdb
File14_180.pdb
I checked many threads but it seems i get even more confused..i... (1 Reply)
Discussion started by: kanikasharma
1 Replies
6. Shell Programming and Scripting
Hi All,
i am taking end of records using tail command got the out is "END OF FILE. ROW COUNT: 10"
and record count in the file is 3. while append the both data into test2.txt file,it's append like
END OF FILE. ROW COUNT: 108
my output should be in the test2.txt file
END OF FILE. ROW... (9 Replies)
Discussion started by: bmk
9 Replies
7. Shell Programming and Scripting
Need to add end of line character to last record in a fixed width file.
When i take the record length of each line, for all the records it gives example like 200 except the last line as 199.
Due to this my other script fails.
Please help me on this. (4 Replies)
Discussion started by: Amrutha24
4 Replies
8. Shell Programming and Scripting
Hi,
I am doing something like below:
cat file1>file3and
cat file2>>file3
I wanted to check if there is a way to write a custom message(hardcoded message)something like below at the beginning of each line then PIPE delimitiation and then followed by remaining record.
cat file1... (7 Replies)
Discussion started by: Saanvi1
7 Replies
9. Shell Programming and Scripting
Hi all and apologies for the silly question, but I've searched and I can't get this right.
I have a list of email addresses in a file that I need to blacklist (spam). the list is quite long and I would need to script a small routine so that I can get the following for each line in the file:
db... (4 Replies)
Discussion started by: bm555
4 Replies
10. UNIX for Beginners Questions & Answers
I need to manipulate one Database file on Solaris 11 in which contains more than 5000 lines of data file path like this:
'/data1/oradata/DBNAME/system01.dbf',
'/data7/oradata/DBNAME/undotbs1_01.dbf',
'/data1/oradata/DBNAME/sysaux01.dbf',
'/data28/oradata/DBNAME/userdata01.dbf',
... (6 Replies)
Discussion started by: duke0001
6 Replies
LEARN ABOUT DEBIAN
plotit
plotit(1) General Commands Manual plotit(1)
NAME
plotit - experiment data visualization
SYNOPSIS
plotit -w FILE
plotit [-lp] -q FILE [FILE]...
plotit [-lp] Y FILE [FILE...]
plotit [-lp] X Y FILE [FILE...]
DESCRIPTION
The plotit program is a simple plotting program which can draw line plots and stripcharts using a command language similar to that of gnu-
plot. It can also make quick plots of multiple data files from the command-line. Wildcards may be used in the file names.
The program takes optional expressions which can be used to manipulate data columns before plotting. Expressions may be as simple as the
designation of a column to be plotted or may contain arithmetic expressions and functions. In the latter case the espression must be
enclosed in 'single' or "double" quotation marks. Column numbers are designated by the at-sign character (@). A single expression is used
for the Y axis of the plot.
OPTIONS
-h, --help
Print the usage and exit.
--version
Print the version number and exit.
-w Watch the input file for commands to stripchart, or wait to read all of stdin before plotting. Only one file or - for stdin may be
specified with this option. No other options may be used in conjuction with this option.
-q Plot the first and second columns of each file.
-l Plot with lines.
-p Plot with points.
EXAMPLES
Plot the second column versus the first of all three files with lines only.
plotit -lq file1.dat file2.dat file3.dat
Plot the quotient of the third column and the second column versus the first column of all files matching the pattern using points only.
plotit -p '@3/@2' file??.dat
Plot the natural log of the second column divided by the third column versus the fourth column. By default these data are plotted with
both lines and points.
plotit @4 'log(@2/@3)' file.dat
AUTHOR
This manual page was written by Carlo Segre <segre@iit.edu>.
February 21, 2009 plotit(1)