10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a file with the following format:
X|High|2|GIC|DM||XHM|||6 Months
X|Moderate|2|GIC|DM||XHM|||6 Months
X|High|2|GCM|DM||XSF|||6 Months
X|Med|2|GCM|DM||XSF|||6
Here there are ten columns but I need to print rows having blank records in any of the rows (except for 6th,8th and 9th... (10 Replies)
Discussion started by: chatwithsaurav
10 Replies
2. Shell Programming and Scripting
Hi All
Need Help
I have a file with the below format (ABC.TXT) :
®¿¿ABCDHEJJSJJ|XCBJSKK01|M|7348974982790
HDFLJDKJSKJ|KJALKSD02|M|7378439274898
KJHSAJKHHJJ|LJDSAJKK03|F|9898982039999
(cont......)
I need to write a script where it will check for : blank lines (between rows,before... (6 Replies)
Discussion started by: chatwithsaurav
6 Replies
3. Shell Programming and Scripting
I have a tab delimited file with some fields potentially containing no data. In ksh 'read' though treats multiple tabs as a single delimiter. Is there any way to change that behavior so I could have blank data too? I.e. When encountering 2 tabs it would take it as a null field? Or do I have to... (3 Replies)
Discussion started by: benalt
3 Replies
4. UNIX for Advanced & Expert Users
Hi Gurus,
Somebody can say me how to delete blank spaces and blank lines in a file unix, please.
Thank you for advanced. (10 Replies)
Discussion started by: systemoper
10 Replies
5. Shell Programming and Scripting
Hi everyone, i need to "grep" a file with a string with space blanks, like this:
grep "XXXX XX" file.txt
The problem, i need put the "XXXX XX" in a string variable. When the script executes the grep, do:
gresp XXXX XX file.txt
How can i solve this problem?
The... (5 Replies)
Discussion started by: Xedrox
5 Replies
6. Shell Programming and Scripting
Hi,
Consider a file named "testfile"
The contents of file are as below
first line added for test
second line added for test
third line added for test
fourth line added for test
fifth line added for test (5 Replies)
Discussion started by: anil8103
5 Replies
7. Shell Programming and Scripting
Hi to all.
In the following example, how can I delete the first blank of the first col? (using shell scripting)
first second third fourth
fifth sixth seventh eighth
Thank's for reading. (5 Replies)
Discussion started by: daniel.gbaena
5 Replies
8. Shell Programming and Scripting
I need to delete the last line only if its blank not otherwise. (3 Replies)
Discussion started by: dinjo_jo
3 Replies
9. Shell Programming and Scripting
I have a sed pipeline:
myVar=$(cat $FILE | sed -n '/regex/,/regex/{/regex/d;p}' | sed -n '/regex/!p' | sed -e s/*:// | sed /regex/,+8d \
)
sed '/^$/d'
sed '/./!d'
And i've tried to add that in a different order rather then just on the end..Why isnt it deleting all the blank... (2 Replies)
Discussion started by: omgsomuchppl
2 Replies
10. UNIX for Dummies Questions & Answers
I want to exclude (-v) blank records from a file before analysing it.
I know I can use '^]$' for spaces and tabs but how do you look for lines that have nothing (/n or line feed) ? (2 Replies)
Discussion started by: Browser_ice
2 Replies