10-14-2008
Ignore me, i've found how to remove spaces by myself.
Thanks again
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Is there an option, for cat, head, tail, or is there any way, to display a file from last line to first? For example, my file
looks like this:
aaaa
bbbb
cccc
eeee
and I would like to print or display it like this:
eeee
cccc
bbbb
aaaa
thanks (5 Replies)
Discussion started by: jpprial
5 Replies
2. UNIX for Dummies Questions & Answers
How can I specify special meaning characters like ^ or $ inside a regex range. e.g
Suppose I want to search for a string that either starts with '|' character or begins with start-of-line character.
I tried the following but it does not work:
sed 's/\(\)/<do something here>/g' file1
... (3 Replies)
Discussion started by: jawsnnn
3 Replies
3. Shell Programming and Scripting
I am very new to scripting and I know this request is simple but I am having no luck with it.
I have a file a.dat with the following data in it.
aa
bb
cc
dd
I need to run a script that will take each line of a.dat and put dsjc/ubin/ in front of each record, so the output looks like
... (2 Replies)
Discussion started by: jclanc8
2 Replies
4. Shell Programming and Scripting
Well here goes:
I tried to write a batch file that adds a specific fixed text to each line of an already existing text file.
for the adding text infront of each line I tried this:
for /F "delims=" %%j in (list.txt) do echo.STARTTEXT\%%j >> list.txt
for adding text after each line I... (0 Replies)
Discussion started by: pasc
0 Replies
5. Shell Programming and Scripting
hi I am trying to use SED to replace the line matching a pattern using the command
sed 'pattern c\
new line
' <file1 >file 2
I got two questions
1. how do I insert a blank space at the beginning of new line?
2. how do I use this command to execute multiple command using the -e... (5 Replies)
Discussion started by: piynik
5 Replies
6. UNIX for Dummies Questions & Answers
How would you do vim copy line and paste at the beginning, middle, and end of another line. I know yy copies the whole line and p pastes the whole line, but on its own separate line. Sometimes I would like to copy a line to the beginning, middle, or end of another line. I would think this would be... (3 Replies)
Discussion started by: cokedude
3 Replies
7. Shell Programming and Scripting
Hi
I've been trying to search but couldn't quite get the answer I was looking for.
I have a a file that's like this
Time, 9/1/12
0:00, 1033
0:10, 1044
...
23:50, 1050
How do I make it so the file will be like this?
9/1/12, 0:00, 1033
9/1/12, 0:10, 1044
...
9/1/12, 23:50, 1050
I... (4 Replies)
Discussion started by: diesel88
4 Replies
8. UNIX for Dummies Questions & Answers
Hi,
Need some help with sed.
I have a file that has sections :
e.g.
a=blah
b=blah
d=blah
e=blah
There's many sections in the file. (1 Reply)
Discussion started by: andyatit
1 Replies
9. Shell Programming and Scripting
Hi,
I have a specific requirement to add text at the beginning and end of a plain text file. I tried to use "sed" with '1i' and '$a' flags but these required two separate "sed" commands separated with "|".
I am looking for some command/option to join these two in single command parameter.
... (6 Replies)
Discussion started by: bhupinder08
6 Replies
10. Shell Programming and Scripting
i am trying to
insert text at the beginning of every even number line
with awk
i can do it with odd number lines
with this command
awk 'NR%2{$0="some text "$0}1' filehow can i edit this command
thanks (5 Replies)
Discussion started by: bob123
5 Replies
SDIFF(1) User Commands SDIFF(1)
NAME
sdiff - side-by-side merge of file differences
SYNOPSIS
sdiff [OPTION]... FILE1 FILE2
DESCRIPTION
Side-by-side merge of file differences.
-o FILE --output=FILE
Operate interactively, sending output to FILE.
-i --ignore-case
Consider upper- and lower-case to be the same.
-E --ignore-tab-expansion
Ignore changes due to tab expansion.
-b --ignore-space-change
Ignore changes in the amount of white space.
-W --ignore-all-space
Ignore all white space.
-B --ignore-blank-lines
Ignore changes whose lines are all blank.
-I RE --ignore-matching-lines=RE
Ignore changes whose lines all match RE.
--strip-trailing-cr
Strip trailing carriage return on input.
-a --text
Treat all files as text.
-w NUM --width=NUM
Output at most NUM (default 130) print columns.
-l --left-column
Output only the left column of common lines.
-s --suppress-common-lines
Do not output common lines.
-t --expand-tabs
Expand tabs to spaces in output.
--tabsize=NUM
Tab stops are every NUM (default 8) print columns.
-d --minimal
Try hard to find a smaller set of changes.
-H --speed-large-files
Assume large files and many scattered small changes.
--diff-program=PROGRAM
Use PROGRAM to compare files.
-v --version
Output version info.
--help Output this help.
If a FILE is `-', read standard input. Exit status is 0 if inputs are the same, 1 if different, 2 if trouble.
AUTHOR
Written by Thomas Lord.
REPORTING BUGS
Report bugs to <bug-gnu-utils@gnu.org>.
COPYRIGHT
Copyright (C) 2007 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
SEE ALSO
The full documentation for sdiff is maintained as a Texinfo manual. If the info and sdiff programs are properly installed at your site,
the command
info diff
should give you access to the complete manual.
diffutils 2.8.7-cvs January 2008 SDIFF(1)