Search Results

Search: Posts Made By: soliton
1,341
Posted By soliton
Not exactly certain on what you mean, I agree...
Not exactly certain on what you mean, I agree with techmonk to use cut if you certain with the format is always the same.

Another way using sed, depends on what is your exact requirement.


$...
1,659
Posted By soliton
You may make use of the -printand -delete...
You may make use of the -printand -delete parameters? e.g.

[soliton@UAT:test]$ ls -1
s1*
s2*
test file
[soliton@UAT:test]$ find . -type f -name "* *" -print
./test file
[soliton@UAT:test]$...
1,249
Posted By soliton
Had a look at your question 1, will the following...
Had a look at your question 1, will the following be sufficient for your requirement?

[soliton@UAT:test]$ cat test.txt
SELECT * FROM ABC;
grant ABC XXXXXX;
DELETE FROM ABC;
INESRT INTO ABC...
3,329
Posted By soliton
Try csplit? [soliton@UAT:test]$ csplit...
Try csplit?
[soliton@UAT:test]$ csplit test.txt "/As of/+1" {*}
36
52
51
0
[soliton@UAT:test]$ cat xx00
aaaaa
bbbbbbb
cccccccccc
As of 2013
[soliton@UAT:test]$ cat xx01
ddddddddd...
1,314
Posted By soliton
You may use paste and bc. paste -sd+...
You may use paste and bc.


paste -sd+ test.txt | bc


Assuming you don't have any extra lines and all lines are numerics.
Showing results 1 to 5 of 5

 
All times are GMT -4. The time now is 02:07 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy