04-29-2011
I tested ... it works .... JUST ONE DOT was missing ...cant beleive!!!
Its a concatenation operator of lines in this case right ??
Cheers Master
Hv a nice weekend
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I am trying to make a script that creates a list of all active (alive) processes sorted by size and then print this list on screen.
Could anyone help me?
Thaks a lot (7 Replies)
Discussion started by: pro
7 Replies
2. Programming
I had seen this error for the first time .....
error: initializer expression list treated as compound expression
please help.... (12 Replies)
Discussion started by: arunchaudhary19
12 Replies
3. Shell Programming and Scripting
Hi -
I am guessing this is fairly simple for someone .. but I can not quite figure it out. I need a sed command to print just parts of lines from a file.
e.g. filea.txt
4710451 : Success : MODIFY : cn=user1,dc=org,dc=uk
Message log started
Message log ended
4710452 : Success : MODIFY :... (7 Replies)
Discussion started by: sniper57
7 Replies
4. UNIX for Advanced & Expert Users
Hi
Is there any unix shell command or utility to know if the file is sorted or not?
Thanks (3 Replies)
Discussion started by: ksailesh
3 Replies
5. Shell Programming and Scripting
Hey, I found a way to print the lines which is just before a regular expression, not including the expression.
sed -n '/regexp/{n;p;}' myfile
Now I'm looking for a way to print all lines, exept the regular expression and also the line before the same regular expression.
Use code tags. (1 Reply)
Discussion started by: Livio
1 Replies
6. Shell Programming and Scripting
Hello,
I want to print a number of lines of a file after a specific expression of a line.
I have this sed command but it prints only 1 line after the expression.
How could I adapt it to print for instance 10 lines after or 15 lines after ?
sed -n '/regexp/{n;p;}'
Thx & Regs,
Rany. (5 Replies)
Discussion started by: rany1
5 Replies
7. Shell Programming and Scripting
CA_RELEASE has a value of 6. I need to check if that this is a numeric value. if not error.
source $CA_VERSION_DATA
if * ]
then
echo "CA_RELESE $CA_RELEASE is invalid"
exit -1
fi
+ source /etc/ncgl/ca_version_data
++ CA_PRODUCT_ID=samxts
++ CA_RELEASE=6
++ CA_WEEK_NO=7
++... (3 Replies)
Discussion started by: ketkee1985
3 Replies
8. UNIX for Dummies Questions & Answers
Dear All,
I am trying to sort an array of numbers to retrieve the mimimum and maximum values of numbers in that array, by printing the first and last elements of the sorted array. My code is @sorted_numbers = sort (@numbers);
print "@sorted_numbers\n";
print "$sorted_numbers,... (0 Replies)
Discussion started by: pawannoel
0 Replies
9. UNIX for Advanced & Expert Users
Hello All,
I'm trying to extract the lines between two consecutive elements of an array from a file.
My array looks like:
problem_arr=(PRS111 PRS213 PRS234)
j=0
while } ]
do
k=`expr $j + 1`
sed -n "/${problem_arr}/,/${problem_arr}/p" problemid.txt
---some operation goes... (11 Replies)
Discussion started by: InduInduIndu
11 Replies
10. Shell Programming and Scripting
hi All ,
I am having a large file with lots of modules as shown below
###############################################
module KKK
kksd
kskks
jsn;lsm
jsnlsn;
Ring
jjsjsj
kskmsm
jjs
endmodule
module llll
1kksd11
k232skks
j33sn;l55sm (6 Replies)
Discussion started by: kshitij
6 Replies
paste(1) General Commands Manual paste(1)
NAME
paste - merge same lines of several files or subsequent lines of one file
SYNOPSIS
file1 file2 ...
list file1 file2 ...
list] file1 file2 ...
DESCRIPTION
In the first two forms, concatenates corresponding lines of the given input files file1, file2, etc. It treats each file as a column or
columns in a table and pastes them together horizontally (parallel merging). In other words, it is the horizontal counterpart of cat(1)
which concatenates vertically; i.e., one file after the other. In the option form above, replaces the function of an older command with
the same name by combining subsequent lines of the input file (serial merging). In all cases, lines are glued together with the tab char-
acter, or with characters from an optionally specified list. Output is to standard output, so can be used as the start of a pipe, or as a
filter if is used instead of a file name.
recognizes the following options and command-line arguments:
Without this option, the new-line characters
of all but the last file (or last line in case of the option) are replaced by a tab character. This option allows replac-
ing the tab character by one or more alternate characters (see below).
list One or more characters immediately following replace the default tab as the line concatenation character. The list is
used circularly; i.e., when exhausted, it is reused. In parallel merging (that is, no option), the lines from the last
file are always terminated with a new-line character, not from the list. The list can contain the special escape
sequences: (new-line), (tab), (backslash), and (empty string, not a null character). Quoting may be necessary if charac-
ters have special meaning to the shell. (For example, to get one backslash, use ).
Merge subsequent lines rather than one from each input file.
Use tab for concatenation, unless a list is specified with the option. Regardless of the list, the very last character of
the file is forced to be a new-line.
Can be used in place of any file name
to read a line from the standard input (there is no prompting).
EXTERNAL INFLUENCES
Environment Variables
determines the locale for the interpretation of text as single- and/or multi-byte characters.
determines the language in which messages are displayed.
If or is not specified in the environment or is set to the empty string, the value of is used as a default for each unspecified or empty
variable. If is not specified or is set to the empty string, a default of "C" (see lang(5)) is used instead of
If any internationalization variable contains an invalid setting, behaves as if all internationalization variables are set to "C". See
environ(5).
International Code Set Support
Single- and multi-byte character code sets are supported.
RETURN VALUE
These commands return the following values upon completion:
Completed successfully.
An error occurred.
EXAMPLES
List directory in one column:
List directory in four columns
Combine pairs of lines into lines
Notes
works similarly, but creates extra blanks, tabs and new-lines for a nice page layout.
DIAGNOSTICS
Except for the option, no more than - 3 input files can be specified (see limits(5)).
AUTHOR
was developed by OSF and HP.
SEE ALSO
cut(1), grep(1), pr(1).
STANDARDS CONFORMANCE
paste(1)