10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hello All,
I have a pipe delimited file and below is a sample data how it looks:
CS123 | | || 5897 | QXCYN87876
As stated above, the delimited files contains sometimes only spaces as data fields and sometimes there are extra spaces before/after numeric/character data fields. My requirement... (4 Replies)
Discussion started by: amvip
4 Replies
2. Shell Programming and Scripting
Input file:
aaaa bbb dd.
qqq wwww e.
Output file:
a a a a <s> b b b <s> d d .
q q q <s> w w w w <s> e .
Can I use sed to do so in one step? (5 Replies)
Discussion started by: Viernes
5 Replies
3. Shell Programming and Scripting
There's an input file(input.txt) which has the following details :
CBA
BA
<Please note the second record has a LEADING WHITESPACE which is VALID>
I am using the following code to read the content of the said file line by line:
while read p ; do
echo "$p"
done < input.txt
This is the... (1 Reply)
Discussion started by: kumarjt
1 Replies
4. Shell Programming and Scripting
HI
I want to remove white spaces from a line
I have a file like
# cat /clsep
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
I need the output like
0
1
2
3
4
.
.
.
15
I feel sed command cannot be used..
I went through the man page of awk command and found (7 Replies)
Discussion started by: Priya Amaresh
7 Replies
5. Shell Programming and Scripting
I assume removing whitespaces in the n first characters of a string would be an easy task for sed? If so, how? (7 Replies)
Discussion started by: KidCactus
7 Replies
6. Shell Programming and Scripting
hello,
i have this string:
variable="1234 /PARAMETER_1:text /PARAMETER_2:othertext"
i tried to do
expr match $variable '.*\(*\)'
but i keep getting expr error
i need to extract the word text...
thank you (4 Replies)
Discussion started by: Aloush89
4 Replies
7. UNIX for Dummies Questions & Answers
Hi All,
Have a query on finding the lines with at least one whitespace. Have following lines in my file myfile.txt
I
I LOVE
I LOVE FREEDOM
I LOVE FREEDOM
I LOVE FREEDOM AND PEACE
I ran the following query to get the lines with at least 3 words.
grep '\(* +\)\{3,\}' myfile.txt... (6 Replies)
Discussion started by: sh_kk
6 Replies
8. Shell Programming and Scripting
Hi,
i have a file which contains data in fixed length. each row contains data of 10 characters fixed length. The data in the file appears like 4567782882
some times i may recieve dat less than fixed length of 10. in such a case i find nulls appended at the trailing spaces when i do a... (2 Replies)
Discussion started by: meeragiri
2 Replies
9. UNIX for Dummies Questions & Answers
Hello,
Im trying write a bash sript to search a file and identify any file names that contain a space at the end of them.
I was trying to use the grep command but I can find how I would identify the character I'm looking for.
Any help would be grately appreciated. (2 Replies)
Discussion started by: gintreach
2 Replies
10. Shell Programming and Scripting
Hello all,
i have a problem.
please help me to remove the white spaces and tabs betweeen line.
i.e.,
file1 contains some text..
text starts_hdsffdsd
sdfsddssdds********
sdfsdsd***********
sdfsdsdfsdsdfsdsds***
****fsd_test_ends
one or 2 blank lines
(* indicates white spaces or tabs)
... (5 Replies)
Discussion started by: kumar1
5 Replies