10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi gurus,
I have a script which works fine.
https://www.unix.com/shell-programming-and-scripting/239347-how-pass-string-into-sql-query.html
while read p
do
&& para="'${p}'" || para="${para},'${p}'"
done < filePlease use code tags as required by forum rules!
a few days... (6 Replies)
Discussion started by: ken6503
6 Replies
2. UNIX for Dummies Questions & Answers
Hi all,
I've got a file that has 12 fields. I've merged 2 files and there will be some duplicates in the following:
FILE:
1. ABC, 12345, TEST1, BILLING, GV, 20/10/2012, C, 8, 100, AA, TT, 100
2. ABC, 12345, TEST1, BILLING, GV, 20/10/2012, C, 8, 100, AA, TT, (EMPTY)
3. CDC, 54321, TEST3,... (4 Replies)
Discussion started by: tugar
4 Replies
3. Shell Programming and Scripting
Hello,
I need a program that read a file line by line and prints out lines 1, 2 & 3 after an empty line... An example of entries in the file would be:
SRVXPAPI001 ERRO JUN24 07:28:34 1775
REASON= 0000, PROCID= #E506 #1065: TPCIPPR, INDEX= 003F
... (8 Replies)
Discussion started by: Ferocci
8 Replies
4. Shell Programming and Scripting
Dear community,
I have two output files that contains some CR
# cat first.out
1234567890 598679857648566 9
1234567234 365837465873465 4
2342343243 289374982374894 4
# cat second.out
2342342342 ... (2 Replies)
Discussion started by: Lord Spectre
2 Replies
5. Shell Programming and Scripting
Hello:
Is there a simple way to remove empty records of FASTA format file?
A FASTA format consists of two parts: header and sequence (for non-biologist, Wiki for details of course!). The header always start with ">" for the name of the sequence. The header must be in this ONLY single line.... (9 Replies)
Discussion started by: yifangt
9 Replies
6. UNIX for Dummies Questions & Answers
Hi all !
I'm sure it is a basic question but I didn't find any threads that fit my need.
How to remove empty fields with awk?
Or in other words, how to shift all the fields after an empty field on the left?
input:
1|2||3|4|5||6
wanted:
1|2|3|4|5|6
I tried:
awk '{for(i=1; i<=NF;... (7 Replies)
Discussion started by: lucasvs
7 Replies
7. Shell Programming and Scripting
FIle A
"A" 2 aa 34
3 ac
5 cd
"B" 3 hu 67
4 fg
5 gy
output shud be
A"" 2 aa 34
"A" 3 ac 34
"A" 5 cd 34
"B" 3 hu 67
"B" 4 fg 67
"B" 5 gy 67 (6 Replies)
Discussion started by: cdfd123
6 Replies
8. Shell Programming and Scripting
Hello:
I searched here for "vi -c" but found no hits.
How can I use vi -c to remove ALL empty lines, regardless of how many?
I tried
<code>
vi -c ":g/^$/d | wq" filename
</code>
but I have to run it several times.
This is NOT homework. :)
Thanks for your time. (3 Replies)
Discussion started by: Habitual
3 Replies
9. UNIX for Dummies Questions & Answers
I know this one was answered before in forum below -
https://www.unix.com/unix-dummies-questions-answers/58210-removing-empty-folders-using-find-command.html
But that one is closed & I have a question so here it goes.
I want to delete all 2006 files. Now if along with the files, if the... (2 Replies)
Discussion started by: kedar.mehta
2 Replies
10. Shell Programming and Scripting
Hi,
I need to delete an empty directory in a temp directory except "dir5" (keep everything that is not empty).
Plese advise.
Here is an example of my directory.
/dir/temp/
dir1 - delete if this is empty
dir2 - delete if this is empty
dir3 - delete if this is empty
dir4 - delete if this... (7 Replies)
Discussion started by: sirrtuan
7 Replies